On 04/22/2017 02:38 AM, John R Pierce wrote:
> On 4/22/2017 2:28 AM, chiru r wrote:
>> I am using Postgresql 9.5 and I have created*backup_admin* user and
>> created *dba_admin *ROLE with SUPERUSER and REPLICATION ,after that
>> GRANT *dba_admin * role to backup_admin user and executed
>> pg_basebakup utility with backup_admin user.
>
>
> role group membership only inherits object rights, like grant ..... on
> table ... to role. it doesn't inherit role attributes like SUPERUSER,
> or REPLICATION. you need to ALTER ROLE to add these to each role.
The OP did that:
...
alter user backup_admin set role to dba_admin;
When I followed their steps I got:
aklaver@tito:~> psql -d test -U backup_admin
Null display is "NULL".
psql (9.6.2)
Type "help" for help.
test=# select session_user, current_user;
session_user | current_user
--------------+--------------
backup_admin | dba_admin
(1 row)
test=# \drds
List of settings
Role | Database | Settings
--------------+----------+----------------
backup_admin | | role=dba_admin
aklaver@tito:~> pg_basebackup -p 5432 -h 127.0.0.1 -U backup_admin -D
pg_test/
Password:
pg_basebackup: could not connect to server: FATAL: must be superuser or
replication role to start walsender
So I would also be interested in knowing why it does not work?
>
>
> --
> john r pierce, recycling bits in santa cruz
>
--
Adrian Klaver
adrian.klaver@aklaver.com