Re: pg_upgrade if 'postgres' database is dropped
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Robert Haas <robertmhaas@gmail.com>,
Magnus Hagander <magnus@hagander.net>, Tom Lane <tgl@sss.pgh.pa.us>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, Stephen Frost <sfrost@snowman.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-11-03T18:03:00Z
Lists: pgsql-hackers
Attachments
- /rtmp/pg_upgrade (text/x-diff) patch
Bruce Momjian wrote: > I fixed this a different way. I originally thought I could skip over > the 'postgres' database in the new cluster if it didn't exist in the old > cluster, but we have do things like check it is empty, so that was going > to be awkward. > > It turns out there was only one place that expected a 1-1 mapping of old > and new databases (file transfer), so I just modified that code to allow > skipping a database in the new cluster that didn't exist in the old > cluster. > > Attached patch applied. This allows an upgrade if the 'postgres' > database is missing from the old cluster. OK, I thought some more and didn't like the way the code could loop off the end of the new cluster without matching all the old cluster database. The attached, applied patches improves this. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +