From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Does anything dump per-database config settings? (was Re: ALTER DATABASE vs pg_dump) |
Date: | 2008-08-21 22:28:55 |
Message-ID: | 200808212228.m7LMStj25093@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
We never came up with any idea of how pg_dump could dump ALTER DATABASE
... SET commands, so I have added a mention in the documentation, and
backpatched to 8.3.X; attached.
---------------------------------------------------------------------------
Richard Huxton wrote:
> Robert Treat wrote:
> > On Tuesday 01 July 2008 03:45:44 Richard Huxton wrote:
> >> The only time we need to restore per-database settings is if the
> >> database has been dropped. If you're not having the dump/restore
> >> re-create the database then presumably you've taken charge of the
> >> per-database settings.
> >
> > I'm not sure I agree with that entirely. For example, one common usage
> > scenario when upgrading between major versions is to create the database,
> > load contrib modules (whose C functions or similar may have changed), and
> > then load the dump into the database. In those case you still might want the
> > database settings to be dumped, even though you are creating the database
> > manually. (Now, one might argue that you could still dump with --create and
> > ignore the error of the database creation command, but that probably isn't
> > ideal).
>
> Well, with -Fc I'd expect it to be dumped all the time and pg_restore
> would selectively restore it. That should mean it has its own line in
> the pg_restore --list output which would let you just comment out the
> database-creation but leave the ALTER...SET in.
>
> --
> Richard Huxton
> Archonet Ltd
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/diff | text/x-diff | 2.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-08-21 22:38:15 | Re: [GENERAL] Surprising syntax error |
Previous Message | Albert Cervera i Areny | 2008-08-21 22:18:51 | Re: [FINALLY] the TODO list has migrated to Wiki |