X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3417ED1B551 for ; Sun, 2 Nov 2003 19:57:17 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 98221-06 for ; Sun, 2 Nov 2003 15:56:46 -0400 (AST) Received: from pasta.sw.starentnetworks.com (pasta.sw.starentnetworks.com [12.33.234.10]) by svr1.postgresql.org (Postfix) with ESMTP id 1F488D1B50E for ; Sun, 2 Nov 2003 15:56:45 -0400 (AST) Received: by pasta.sw.starentnetworks.com (Postfix, from userid 1008) id 48DBD14A183; Sun, 2 Nov 2003 14:56:45 -0500 (EST) Date: Sun, 2 Nov 2003 14:56:45 -0500 From: Brian Ristuccia To: Tom Lane Cc: pgsql-admin@postgresql.org Subject: Re: dumping tables from badly damaged db Message-ID: <20031102195645.GA20825@sw.starentnetworks.com> References: <20031031161943.GB24232@sw.starentnetworks.com> <6231.1067627157@sss.pgh.pa.us> <20031031191546.GC24232@sw.starentnetworks.com> <16557.1067629557@sss.pgh.pa.us> <20031102184538.GL24232@sw.starentnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031102184538.GL24232@sw.starentnetworks.com> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/6 X-Sequence-Number: 10994 On Sun, Nov 02, 2003 at 01:45:39PM -0500, Brian Ristuccia wrote: > > pg_dump: NOTICE: RelationBuildDesc: can't open deprecated_data1: No such file or directory > pg_dump: NOTICE: RelationBuildDesc: can't open unimportant_stuff: No such file or directory > pg_dump: handler procedure for procedural language plpgsql not found > > I can't drop the tables from psql: > > drop TABLE deprecated_data1 ; > ERROR: cannot open deprecated_data1: No such file or directory > Ok. I managed to drop these in the standalone backend with some hackery: backend> drop table useless_junk NOTICE: RelationBuildDesc: can't open useless_junk: No such file or directory ERROR: cannot open useless_junk: No such file or directory So I'd have to go select on pg_class and find the relfilenode, go touch that file so it exists. Try the drop again. Drop any indexes which don't exist. Find the relfilenode for the associated pg_toast table and go touch that file too. Not a lot of fun, but the destroyed tables are gone now. > Am I likely to have success by performing surgery on the pg_table relation > in order to remove these destroyed tables? A simple DROP LANGUAGE did the trick. I can now run pg_dump - I feel much better. -- Brian Ristuccia