Thread: failed sanity check, table answers was not found

failed sanity check, table answers was not found

From
Marek Pętlicki
Date:
I receive this error when trying to pg_dump -s

    failed sanity check, table answers was not found

the failed table name varies. All the problematic tables
seem to work. vacuumdb (-z) also works without any comment.

This is a production database on 7.0.3
I'd like to migrate to 7.1, but I am affraid that the dumps are corrupt.

regards

--
Marek Pętlicki <marpet@buy.pl>


Re: failed sanity check, table answers was not found

From
Tom Lane
Date:
=?iso-8859-2?Q?Marek_P=EAtlicki?= <marpet@buy.pl> writes:
> I receive this error when trying to pg_dump -s
>     failed sanity check, table answers was not found

I suspect you have a table whose owner no longer exists in pg_shadow.
Check the pg_class.relowner value for that table, and create a user
with the matching usesysid.

            regards, tom lane

RE: failed sanity check, table answers was not found

From
Matthew
Date:
> I receive this error when trying to pg_dump -s
>
>     failed sanity check, table answers was not found
>
> the failed table name varies. All the problematic tables
> seem to work. vacuumdb (-z) also works without any comment.
>
    I had some similar problems with pg_dump on 7.0.3 recently.  Tom
Lane was able to give me some very specific things to look at.  The error I
was getting was:

> --  dumping out user-defined functions
> failed sanity check, type with oid 101993741 was not found

And Tom told me, "Looks like you have a function that refers to a
since-deleted type. You'll need to find and drop the function (which may
mean manually
deleting its pg_proc row, since there's no way to name the function
to DROP FUNCTION if one of its parameters is a now-unknown type).

Another possibility is that the type still exists but you deleted its
owning user from pg_shadow; that will confuse pg_dump too.  In that
case you can just create a new user with the same usesysid, or you can
update the type's typowner field in pg_type to refer to some existing
user.

Try "select * from pg_type where oid = 101993741" to figure out which
situation applies ..."

Don't know if that will help at all. Seems this is usally something where
something references soemthign that doesnt' exist any more, such as a
function that returns a datatyp that no longer exists.

Re: failed sanity check, table answers was not found

From
Marek Pętlicki
Date:
On Tuesday, April, 2001-04-17 at 17:05:18, Tom Lane wrote:
> =?iso-8859-2?Q?Marek_P=EAtlicki?= <marpet@buy.pl> writes:
> > I receive this error when trying to pg_dump -s
> >     failed sanity check, table answers was not found
>
> I suspect you have a table whose owner no longer exists in pg_shadow.
> Check the pg_class.relowner value for that table, and create a user
> with the matching usesysid.

yes, now I remember messing arround with users...

    update pg_class set relowner=good_one where relowner=bad_one;

worked like charm!

so ma path towards 7.1 is straight and bright now!

thanks and bye!

--
Marek Pętlicki <marpet@buy.pl>