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 14215.968687293@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump failed sanity check and user defined types  (Brook Milligan <brook@biology.nmsu.edu>)
Responses Re: pg_dump failed sanity check and user defined types
List pgsql-hackers
Brook Milligan <brook@biology.nmsu.edu> writes:
> However, I have one database with a user defined type and get the
> following error from pg_dump:
>      pg_dump -sc -D test > pg_dump.schema || true
>      failed sanity check, type with oid 3516132 was not found
> Any clues about this?  Does it matter?

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).

It does matter, since IIRC pg_dump aborts when it finds such an
inconsistency; so you're getting an incomplete dump.

You should be able to find the offending entries by searching through
the system catalogs with queries likeselect * from pg_operator where oprleft = 3516132
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jules Bean
Date:
Subject: Re: Constant propagation and similar issues
Next
From: Jules Bean
Date:
Subject: Re: Constant propagation and similar issues