Re: Does anything dump per-database config settings? (was Re: ALTER DATABASE vs pg_dump) - Mailing list pgsql-hackers

From Richard Huxton
Subject Re: Does anything dump per-database config settings? (was Re: ALTER DATABASE vs pg_dump)
Date
Msg-id 486A4B9D.4060001@archonet.com
Whole thread Raw
In response to Re: Does anything dump per-database config settings? (was Re: ALTER DATABASE vs pg_dump)  (Robert Treat <xzilla@users.sourceforge.net>)
Responses Re: Does anything dump per-database config settings? (was Re: ALTER DATABASE vs pg_dump)  (Bruce Momjian <bruce@momjian.us>)
List 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


pgsql-hackers by date:

Previous
From: "Marko Kreen"
Date:
Subject: Re: Latest on CITEXT 2.0
Next
From: Bruce Momjian
Date:
Subject: Re: Latest on CITEXT 2.0