Re: Dumping roles improvements? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Dumping roles improvements?
Date
Msg-id 28964.1318450901@sss.pgh.pa.us
Whole thread Raw
In response to Re: Dumping roles improvements?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Dumping roles improvements?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> On 10/11/11 9:43 PM, Tom Lane wrote:
>> I don't find this terribly convincing.  I can see the rationales for two
>> endpoint cases: (1) restore these objects into exactly the same
>> ownership/permissions environment that existed before, and (2) restore
>> these objects with the absolute minimum of ownership/permissions
>> assumptions.  The latter case seems to me to be covered already by
>> --no-owner --no-privileges.

> But what I'm asking for is (1).  The problem is that the roles don't
> ship in the per-database pgdump file.

In that case you do "pg_dumpall -r" first and then pg_dump your
individual database.  I thought you were looking for something that
would dump only roles referenced in the particular database, which
is why it sounded like an intermediate case.

I know that the division of labor between pg_dumpall and pg_dump could
use rethinking, but it needs to be actually rethought, in toto, not
hacked one minor feature at a time.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: patch: move dumpUserConfig call in dumpRoles function of pg_dumpall.c
Next
From: Phil Sorber
Date:
Subject: Re: patch: move dumpUserConfig call in dumpRoles function of pg_dumpall.c