More Problems
More Problems
От:
Matthew <matt@ctlno.com>
Дата:
My nightly dump of one of my databases started failing Wednesday night and I'm not sure what is going on. When I pg_dump this one database (others on this machine are fine) I get this output from pg_dump -- last builtin oid is 17216 -- reading user-defined types -- reading user-defined functions -- reading user-defined aggregates -- reading user-defined operators -- reading user-defined tables -- finding Triggers for relation: 'jobs' [snip] ... -- finding DEFAULT expression for attr: 'id' -- finding the attrs and types for table: 'testassignments' -- finding DEFAULT expression for attr: 'id' -- finding DEFAULT expression for attr: 'standby' -- finding the attrs and types for table: 'pagedata' -- finding DEFAULT expression for attr: 'id' -- flagging inherited attributes in subtables -- dumping out database comment -- dumping out user-defined types -- dumping out tables -- dumping out user-defined procedural languages -- dumping out user-defined functions failed sanity check, type with oid 101993741 was not found relevant info: pg7.0.2 on redhat 6.1, 700MHz Athlon, 256M, linux software mirror hard drives. btw: This is a completely different server at a different location from the one that was having problems two weeks ago and thank you all for the help then, I don't think I emailed a thank you, it was a busy day.
Re: More Problems
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Matthew writes: > -- dumping out user-defined functions > failed sanity check, type with oid 101993741 was not found 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 ... regards, tom lane