Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Jeff <threshar(at)threshar(dot)is-a-geek(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables
Date: 2009-08-06 01:46:15
Message-ID: 200908060146.n761kFD25880@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Tom Lane wrote:
> >> Hm ... has anyone tested pg_migrator using either composite types or
> >> arrays of user-defined types? Both of them have got user-defined-type
> >> OIDs in on-disk data, now that I think about it. For that matter, enums
> >> are going to be a problem too.
>
> > Don't arrays have embedded element OIDs too?
>
> Er, that's what I said. It looks nasty :-(

Seems we have two possible directions to go in. First I can easily
cause pg_migrator to exit if it finds any of these issues in any
database.

To allow pg_migrator to work, I would need to reserve the oids in
pg_type, import the dump, and renumber the pg_type entries (and
everything pointing to them) to the proper pg_type.oid. The big problem
there is that I don't have access at the SQL level to set or change
oids. I am afraid the oid remumbering is something we would have to do
in the backend by walking through the pg_depend entries for the pg_type
row. Yuck.

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

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-06 02:13:17 Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables
Previous Message Bruce Momjian 2009-08-06 01:25:40 Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables