Re: pg_dump failed sanity check and user defined types - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump failed sanity check and user defined types
Date
Msg-id 18579.968704621@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump failed sanity check and user defined types  (Brook Milligan <brook@biology.nmsu.edu>)
List pgsql-hackers
Brook Milligan <brook@biology.nmsu.edu> writes:
>> failed sanity check, type with oid 3516132 was not found

>    Sounds like you dropped a user type without remembering to drop all
>    the functions/operators defined for it.  Unfortunately there's no
>    safety cross-check in DROP TYPE (probably there should be).

> That's what I would have guessed, but I'm pretty sure that is not the
> case (but I'm new to UDTs, so bear with me; maybe I'm not constructing
> my script right).  See the script below that does the installation of
> the types and functions.  The problem occurs after running this script
> followed by the pg_dump above.

I can't duplicate that, either in current sources or 7.0.2.  Are you
sure you're blaming the right bit of script?

> Is there some order dependency for dropping types and functions?
> Should I not be dropping these before creating them (I do this to
> allow rerunning the script)?  Does it have anything to do with the
> fact that a single object.so provides all the entry points?

What you showed looks fine.

>    You should be able to find the offending entries by searching through
>    the system catalogs with queries like
>        select * from pg_operator where oprleft = 3516132

> There are no rows found.

You may need to dig into pg_dump and see exactly what it's complaining
about ... it's getting that OID from someplace ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Brook Milligan
Date:
Subject: operators and indexes
Next
From: Alfred Perlstein
Date:
Subject: bug with dropping tables and transactions.