Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 743CA476A5D for ; Tue, 7 Jan 2003 09:34:33 -0500 (EST) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by postgresql.org (Postfix) with ESMTP id 31EBC476439 for ; Tue, 7 Jan 2003 09:34:13 -0500 (EST) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 114C83D27; Tue, 7 Jan 2003 09:34:56 -0500 (EST) From: "Dan Langille" To: pgsql-admin@postgresql.org Date: Tue, 07 Jan 2003 09:35:08 -0500 MIME-Version: 1.0 Subject: sanity error with pg_dump on postgresql 7.0.2 Cc: bain@tcsn.co.za Message-ID: <3E1A9F4C.10041.5939DDA@localhost> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/49 X-Sequence-Number: 6891 I am forwarding this on behalf of bain@tcsn.co.za who is at a client site and cannot email. He's found a solution to the problem but wants to know if there are any other issues. Hopefully, this will document the problem/solution in one tidy place. Please cc any replies to both him and me. ### Hi there :) I'm having a problem updating from a default Mandrake 8.0 postresql (7.0.3) insallation to 7.3. When I run pg_dump/pg_dumpall I get error "failed sanity check, table trading was not found" This is an installation I did for a client over a year ago and they have java apps using it. They also "maintain" the database accesslists. I only fix things that break. I did a search and found a mail stating that its possibly related to a deleted user having ownership of the table. "http://www.geocrawler.com/mail/msg.php3?msg_id=5653159&list=10" I checked and indeed the owner that created the table no longer exists. Unfortunately I have no idea who that user was. I have also tried to change the pg_user with a new user to match the missing sysid and pg_tables setting to match a valid user sysid, but cannot seem to change them. I desperately need this database dumped and moved. can anybody give some insign into how I can get around the problem? Thank you Henti Smith bain@tcsn.co.za ------- End of forwarded message ------- Just before I sent this email, Henti told me of this solution which he arrived at: ### thanks for dan@langille.org and all the guys on #postgresql (irc.openprojects.org) for all their help and suggestions. The problem is solved. 1.) psql dbname 2.) select * from pg_table; this lists all th detaild of the tables in the DB. some might have owner set to "unknown (sysid=xx)" this is the problem. (note the sysid number) 3.) createuser -i xx (sysid user of the unknown table owner) 4.) pg_dump / pg_dumpall This solves the "failed sanity check, table XXXXXX was not found" error when running pg_dump / pg_dumpall ------- End of forwarded message ------- Feedback on this solution is appreciated. -- Dan Langille : http://www.langille.org/