From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
Cc: | 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-07-01 15:22:05 |
Message-ID: | 486A4B9D.4060001@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-07-01 15:25:07 | Re: Latest on CITEXT 2.0 |
Previous Message | Bruce Momjian | 2008-07-01 15:20:43 | Re: [HACKERS] odd output in restore mode |