Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables
Date
Msg-id 200908060125.n761PeD23552@momjian.us
Whole thread Raw
In response to Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > I received the following pg_migrator bug report today and was able to
> > reproduce the reported failure when using composite types:
> 
> >     test=> SELECT * FROM breakmigrator;
> >     ERROR:  cache lookup failed for type 27604
> 
> 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.

Yep, I realized that since I posted.  It seems composite types are
mini-heap tuples, except that instead of xmin/xmax, they have type
information:
typedef struct DatumTupleFields{    int32       datum_len_;     /* varlena header (do not touch directly!) */    int32
    datum_typmod;   /* -1, or identifier of a record type */    Oid         datum_typeid;   /* composite type OID, or
RECORDOID*/    /*     * Note: field ordering is chosen with thought that Oid might someday     * widen to 64 bits.
*/}DatumTupleFields;
 

datum_typeid is where the composite type oid is stored.

Do we have no composite types in the regression tests, or do we not
store any in the database?  Same the enums.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Alpha Releases: Docs?
Next
From: Bruce Momjian
Date:
Subject: Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables