Re: pg_upgrade if 'postgres' database is dropped - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pg_upgrade if 'postgres' database is dropped
Date
Msg-id CA+TgmoYBNOyOgidxZieEUPUwsY5w=sDbNgOFGsDkv6zg-ifdkA@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade if 'postgres' database is dropped  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Fri, Oct 28, 2011 at 10:18 AM, Bruce Momjian <bruce@momjian.us> wrote:
> Bruce Momjian wrote:
>> Robert Haas wrote:
>> > On Fri, Oct 28, 2011 at 10:07 AM, Bruce Momjian <bruce@momjian.us> wrote:
>> > > OK, then the simplest fix, once you modify pg_dumpall, would be to
>> > > modify pg_upgrade to remove reference to the postgres database in the
>> > > new cluster if it doesn't exist in the old one. ?That would allow
>> > > pg_upgrade to maintain a 1-1 matching of databases in the old and new
>> > > cluster --- it allows the change to be locallized without affecting much
>> > > code.
>> >
>> > That sounds just fine.  +1.
>>
>> FYI, I don't want to modify pg_dumpall myself because I didn't want to
>> have pg_upgrade forcing a pg_dumpall change that applies to
>> non-binary-upgrade dumps.  pg_dumpall is too important.  I am fine if
>> someone else does it, though.  :-)
>
> If you want crazy, you could suppress the "\connect postgres" line only
> in --binary-upgrade dumps, but that seems to error-prone because then
> only --binary-upgrade dumps are exercising that behavior.

Also, then it would still be doing something silly in the non
--binary-upgrade case.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: So, is COUNT(*) fast now?
Next
From: "Kevin Grittner"
Date:
Subject: Re: TOAST versus VACUUM, or "missing chunk number 0 for toast value" identified