I am forwarding this on behalf of [EMAIL PROTECTED] 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
[EMAIL PROTECTED]

------- End of forwarded message -------

Just before I sent this email, Henti told me of this solution which 
he arrived at:

###

thanks for [EMAIL PROTECTED] 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/


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to