Re: [GENERAL] pg_basebackup issue

2017-04-23 Thread David G. Johnston
On Sunday, April 23, 2017, chiru r wrote: > Thank you for your reply. > > I agree, However we are planning, users not to have any direct privileges > on database objects or default roles(like SUPERUSER,CREATEDB,REPLICATION..etc) > in postgres. > > looking to create users(LOGIN) only and Grant all

Re: [GENERAL] pg_basebackup issue

2017-04-23 Thread Adrian Klaver
On 04/23/2017 04:52 AM, chiru r wrote: Thank you for your reply. I agree, However we are planning, users not to have any direct privileges on database objects or default roles(like SUPERUSER,CREATEDB,REPLICATION..etc) in postgres. looking to create users(LOGIN) only and Grant all the privileges

Re: [GENERAL] pg_basebackup issue

2017-04-23 Thread Adrian Klaver
On 04/23/2017 04:52 AM, chiru r wrote: Thank you for your reply. I agree, However we are planning, users not to have any direct privileges on database objects or default roles(like SUPERUSER,CREATEDB,REPLICATION..etc) in postgres. looking to create users(LOGIN) only and Grant all the privileges

Re: [GENERAL] pg_basebackup issue

2017-04-23 Thread Scott Marlowe
On Sat, Apr 22, 2017 at 8:03 PM, David G. Johnston wrote: > On Saturday, April 22, 2017, chiru r wrote: >> >> Thank you Adrian. >> >> It seems the code is allowing only who has Superuser/Replication role >> directly. >> >> Is there any possibility in future releases they allow both case A & B >>

Re: [GENERAL] pg_basebackup issue

2017-04-23 Thread chiru r
Thank you for your reply. I agree, However we are planning, users not to have any direct privileges on database objects or default roles(like SUPERUSER,CREATEDB,REPLICATION..etc) in postgres. looking to create users(LOGIN) only and Grant all the privileges through roles like below. *Steps: * Cre

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread Adrian Klaver
On 04/22/2017 08:04 PM, chiru r wrote: Use case: Want to control database privileges/default roles by creating roles instead of granting directly to users. So that we can manage database access control easily. Which you can do. However, pg_basebackup is a cluster wide command not tied a partic

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread chiru r
Use case: Want to control database privileges/default roles by creating roles instead of granting directly to users. So that we can manage database access control easily. Thanks, Chiru On Sat, Apr 22, 2017 at 10:03 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Saturday, April 2

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread David G. Johnston
On Saturday, April 22, 2017, chiru r wrote: > Thank you Adrian. > > It seems the code is allowing only who has Superuser/Replication role > directly. > > Is there any possibility in future releases they allow both case A & B > Users able to use pg_basebackup. > > It does not seem wise to introd

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread chiru r
Thank you Adrian. It seems the code is allowing only who has Superuser/Replication role directly. Is there any possibility in future releases they allow both case A & B Users able to use pg_basebackup. Working: A) CREATE USER backup_user SUPERUSER; Not working: B) postgres=# create user ba

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread Adrian Klaver
On 04/22/2017 12:56 PM, chiru r wrote: Thanks you. The FATAL message is not clear. Yes, It is helpful if someone with more knowledge of the connection code. Well if your interested in looking for yourself look here: src/backend/utils/init/postinit.c https://git.postgresql.org/gitweb/?p=postgr

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread chiru r
Thanks you. The FATAL message is not clear. Yes, It is helpful if someone with more knowledge of the connection code. [postgres@pgserver ~]$ /opt/PostgreSQL/9.5/bin/pg_basebackup --format=t --pgdata=online_backups1 -p 5432 -U *backup_admin* -x -z --verbose *pg_basebackup: could not connect to

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread Adrian Klaver
On 04/22/2017 10:04 AM, chiru r wrote: Thanks for the reply, Actually I am not setting Role for database specific,I did set Role to user. Since users and roles are global for all databases in PostgreSQL,I believe it should work for replication pesudo database. Except for the part where the 're

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread chiru r
Thanks for the reply, Actually I am not setting Role for database specific,I did set Role to user. Since users and roles are global for all databases in PostgreSQL,I believe it should work for replication pesudo database. Thanks, Chiru On Sat, Apr 22, 2017 at 12:34 PM, Adrian Klaver wrote: > O

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread Adrian Klaver
On 04/22/2017 08:13 AM, chiru r wrote: But, SUPERUSER privileges are working, you can see above I am able to do CREATEUSER and CREATEDB. What is the differences in case A and case B for Superuser? I had flash of insight while driving. The insight being that the problem is down to this: http

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread chiru r
But, SUPERUSER privileges are working, you can see above I am able to do CREATEUSER and CREATEDB. What is the differences in case A and case B for Superuser? Thanks, Chiru On Sat, Apr 22, 2017 at 10:45 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Saturday, April 22, 2017, ch

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread David G. Johnston
On Saturday, April 22, 2017, chiru r wrote: > Thank you for the reply. > > It is inheriting role attributes. I am able to do CREATEDB,CREATEROLE... > etc . > Even i am able to do manual start backup and stop backup also using > *backup_admin.* > So I've recently read that while some role attribu

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread chiru r
Thank you for the reply. It is inheriting role attributes. I am able to do CREATEDB,CREATEROLE... etc . Even i am able to do manual start backup and stop backup also using *backup_admin.* But I am not able to do *pg_basebackup *using *backup_admin ** .* postgres=# create user backup_admin passw

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread Adrian Klaver
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 util

Re: [GENERAL] pg_basebackup issue

2017-04-22 Thread John R Pierce
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 me

[GENERAL] pg_basebackup issue

2017-04-22 Thread chiru r
Hello, 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. But I am not able to use the pg_basebackup utili