Re: pg_upgrade libraries check
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <bruce@momjian.us>, Andrew Dunstan <andrew@dunslane.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2012-05-28T20:06:56Z
Lists: pgsql-hackers
On Sun, May 27, 2012 at 11:31 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > I don't recall exactly what problems drove us to make pg_upgrade do > what it does with extensions, but we need a different fix for them. Well, you need pg_upgrade to preserve the OIDs of objects that are part of extensions just as you do for any other objects. If pg_dump --binary-upgrade just emits "CREATE EXTENSION snarfle", for some extension snarfle that provides an eponymous type, then the new cluster is going to end up with a type with a different OID than than whatever existed in the old cluster, and that's going to break all sorts of things - e.g. arrays already on disk that contain the old type OID. I think that it would be an extremely fine thing if we could fix the world so that we not preserve OIDs across a pg_upgrade; that would be all kinds of wonderful. However, I think that's likely to be quite a difficult project. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company