Re: sanity check fails

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Johann Spies <jhspies(at)adept(dot)co(dot)za>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: sanity check fails
Date: 2000-05-16 04:49:33
Message-ID: 9768.958452573@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Johann Spies <jhspies(at)adept(dot)co(dot)za> writes:
> When I try to backup my database using pg_dump I get the following error:
> -- dumping out user-defined functions
> failed sanity check, type with oid 96867 was not found
> How can I correct that?

It sounds like you had a user-defined type that you deleted without
first having deleted all the functions that accepted or returned that
type. You can look for the culprit function with

select * from pg_proc where prorettype = 96867 or
pg_proc.proargtypes[0] = 96867 or
pg_proc.proargtypes[1] = 96867 or
...
pg_proc.proargtypes[7] = 96867;

Some room for improvement here, obviously: pg_dump ought to identify
where it found the dangling type reference, and even better you
shouldn't be able to drop a still-referenced type in the first place...

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Erol Oz 2000-05-16 06:57:41 Re: is multiple insert possible with posgress?
Previous Message Tom Lane 2000-05-16 03:58:43 Re: is multiple insert possible with posgress?