Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA39269 for ; Tue, 16 May 2000 00:49:45 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA09771; Tue, 16 May 2000 00:49:33 -0400 (EDT) To: Johann Spies cc: pgsql-sql@postgresql.org Subject: Re: sanity check fails In-reply-to: <20000515145503.A3938@futurenet.co.za> References: <20000515145503.A3938@futurenet.co.za> Comments: In-reply-to Johann Spies message dated "Mon, 15 May 2000 14:55:03 +0200" Date: Tue, 16 May 2000 00:49:33 -0400 Message-ID: <9768.958452573@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200005/5 Johann Spies 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