tpch1s=# CREATE ROLE yz WITH SUPERUSER CREATEDB CREATEROLE LOGIN REPLICATION INHERIT PASSWORD '111' RESOURCE GROUP rgroup1; tpch1s=# \du List of roles Role name | Attributes | Member of -----------+-----------------------------------------------------------------------+----- gpadmin | Superuser, Create role, Create DB, Ext gpfdist Table, ……, Replication | {} yz | Superuser, Create role, Create DB, Replication | {} -- 查询角色与资源组之间关系: tpch1s=# SELECT rolname, rsgname FROM pg_roles, pg_resgroup WHERE pg_roles.rolresgroup=pg_resgroup.oid; rolname | rsgname ---------+------------- gpadmin | admin_group yz | rgroup1 (2 rows)