Re: TODO item: Allow more complex user/database default GUC settings - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: TODO item: Allow more complex user/database default GUC settings
Date
Msg-id 20090930160046.GE8280@alvh.no-ip.org
Whole thread Raw
In response to Re: TODO item: Allow more complex user/database default GUC settings  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: TODO item: Allow more complex user/database default GUC settings
List pgsql-hackers
Tom Lane escribió:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > And here's the last necessary bit, which is pg_dump support for all
> > this.
> 
> > +         /* Dump role/database settings */
> > +         if (!tablespaces_only)
> > +         {
> > +             if (server_version >= 80500)
> > +                 dumpDbRoleConfig(conn);
> > +         }
> 
> Hmm ... I would kind of think that --roles-only should suppress this too.
> Otherwise you're going to be dumping commands that might refer to
> nonexistent databases.

Hmm.  The problem I have with this idea is that the only way to dump the
per-database role settings is if you are also dumping the contents of
all databases.  Which seems like a pain to me because the usage I
usually recommend is to backup global objects with pg_dumpall -g.

I wonder if pg_dumpall should have a method for dumping database
creation and settings, excluding contents (leaving that for plain
pg_dump).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: TODO item: Allow more complex user/database default GUC settings
Next
From: Robert Haas
Date:
Subject: Re: CommitFest 2009-09, two weeks on