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

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, 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-07 14:07:34
Message-ID: 4A7C3526.20000@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dne 6.08.09 04:29, Tom Lane napsal(a):
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> preventing a clash might be fairly difficult.
>
> Yeah, I was just thinking about that. The easiest way to avoid
> collisions would be to make pg_dump (in --binary-upgrade mode)
> responsible for being sure that *every* new pg_type and pg_class row
> OID matches what it was in the old DB. We could stop doing that
> once we have all the user tables in place --- I don't believe it's
> necessary to preserve the OIDs of user indexes. But we need to
> preserve toast table OIDs, and toast table index OIDs too if those
> are created at the same time they are now (else we risk one of them
> colliding with a toast table OID we want to create later).
>
> Oh, and pg_enum rows too.
>
> It seems doable, but we're certainly not going to back-patch
> any such thing into 8.4 ...

Another way is to use direct catalog update which I presented on PgCon.
I think it should be easy to finish it (2-3weeks) for 8.4 - needs small
extension of bootstrap. And of course testing, testing ...

Also to remove oid in catalog and replace it with standard column (type
can be oid) should make things easier. But it is for 8.5.

I will send a code on Monday for people who wants to look on it.

Zdenek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-07 14:10:19 Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Previous Message Boszormenyi Zoltan 2009-08-07 14:03:38 Re: Split-up ECPG patches