Re: "Re: Question about grant create on database and pg_dump/pg_dumpall

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "Re: Question about grant create on database and pg_dump/pg_dumpall
Date: 2016-09-29 08:04:48
Message-ID: CAJrrPGeyTAHT1ysWSayQpUvGjJ+rWeFVErOZ6VS1ps_Rh+6sQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 26, 2016 at 2:29 PM, Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
wrote:

> On Tue, Jul 5, 2016 at 06:39 AM, Haribabu Kommi
> kommi(dot)haribabu(at)gmail(dot)com wrote:
>
> Still i feel the GRANT statements should be present, as the create
> database statement
> is generated only with -C option. So attached patch produces the GRANT
> statements based
> on the -x option.
>
>
> The attached patch does the job fine. However, I am a little skeptical
> about this addition, since, it is clearly mentioned in the documentation of
> pg_dump that it would not restore global objects, then why expecting this.
> This addditon makes pg_dump -C somewhat special as now it is restoring
> these grant statements. Only if we consider the popular method of
> dump-restore mentioned in the thread (https://www.postgresql.org/me
> ssage-id/E1VYMqi-0001P4-P4%40wrigleys.postgresql.org) with pg_dumpall -g
> and then individual pg_dump, then it would be helpful to have this patch.
>

Thanks for your comments.

I am also not sure whether pg_dumpall -g and then individual pg_dump
is the more widely used approach or not? If it is the case, it is better
to fix the grant statements with -C option, otherwise I agree that
this patch is not required.

Any opinions from other members?

Regards,
Hari Babu
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-09-29 08:05:19 Re: IF (NOT) EXISTS in psql-completion
Previous Message Michael Paquier 2016-09-29 07:59:55 Re: WAL logging problem in 9.4.3?