Re: pg_basebackup issue

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_basebackup issue
Date: 2017-04-22 14:12:22
Message-ID: 536ada07-32b0-6386-b349-57c7f2f0f4db@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)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(at)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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message chiru r 2017-04-22 14:35:37 Re: pg_basebackup issue
Previous Message Edson Lidorio 2017-04-22 14:11:20 Re: Recover PostgreSQL database folder data