The catalog pg_auth_members shows the membership relations between roles. Any non-circular set of relationships is allowed.
Because user identities are cluster-wide, pg_auth_members is shared across all databases of a cluster: there is only one copy of pg_auth_members per cluster, not one per database.
Table 43-9. pg_auth_members Columns
|ID of a role that has a member
|ID of a role that is a member of roleid
|ID of the role that granted this membership
|True if member may grant membership in roleid to others