Bruce Momjian wrote: > > 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 > > test=> ANALYZE VERBOSE public.breakmigrator; > INFO: analyzing "public.breakmigrator" > INFO: "breakmigrator": scanned 1 of 1 pages, containing 3 live rows and > 0 dead rows; 3 rows in sample, 3 estimated total rows > ERROR: cache lookup failed for type 27604 > > There is no pg_type row with oid 27604. > > Can anyone suggest the cause? Do we embed the object oid in the > composite object? Did we change the composite object storage layout > between 8.3 and 8.4? I am surprised the regression tests didn't show > this error. (I just tried ANALYZE on the regression database and it > succeeded.)
More info: I found 27604 in the old 8.3 database: test=> SELECT * FROM pg_type WHERE oid = 27604; -[ RECORD 1 ]-+------------ typname | footype typnamespace | 2200 typowner | 10 typlen | -1 typbyval | f typtype | c typisdefined | t typdelim | , typrelid | 27602 typelem | 0 typarray | 27603 typinput | record_in typoutput | record_out typreceive | record_recv typsend | record_send typmodin | - typmodout | - typanalyze | - typalign | d typstorage | x typnotnull | f typbasetype | 0 typtypmod | -1 typndims | 0 typdefaultbin | typdefault | 'footype' has a different oid in the new 8.4 database: test=> SELECT oid, * FROM pg_type WHERE typname = 'footype'; -[ RECORD 1 ]--+------------ oid | 17580 typname | footype typnamespace | 2200 typowner | 10 typlen | -1 typbyval | f typtype | c typcategory | C typispreferred | f typisdefined | t typdelim | , typrelid | 17578 typelem | 0 typarray | 17579 typinput | record_in typoutput | record_out typreceive | record_recv typsend | record_send typmodin | - typmodout | - typanalyze | - typalign | d typstorage | x typnotnull | f typbasetype | 0 typtypmod | -1 typndims | 0 typdefaultbin | typdefault | -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers