Fix for pg_upgrade with extra new cluster databases

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Fix for pg_upgrade with extra new cluster databases
Date: 2011-04-20 01:02:41
Message-ID: 201104200102.p3K12gi09859@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The attached, applied patch adds a check to throw a pg_upgrade error
during the check phase, rather than during the post-check upgrade phase.

Specifically, if someone removes the 'postgres' database from the old
cluster and the new cluster has a 'postgres' database, the number of
databases will not match. We actually could upgrade such a setup, but
it would violate the 1-to-1 mapping of database counts, so we throw an
error instead.

Previously they got an error during the upgrade, and not at the check
stage; PG 9.0.4 does the same.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/pg_upgrade.diff text/x-diff 3.8 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2011-04-20 01:42:35 Re: [HACKERS] Re: pgsql: setlocale() on Windows doesn't work correctly if the locale name
Previous Message Tom Lane 2011-04-20 00:37:12 Re: Insufficient description in collation mismatch error