Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 473559FBB0B for ; Wed, 4 Apr 2007 13:57:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 47514-06 for ; Wed, 4 Apr 2007 13:57:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id F01729FBA4B for ; Wed, 4 Apr 2007 13:57:30 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l34GvDug022929; Wed, 4 Apr 2007 12:57:13 -0400 (EDT) To: "Craig A. James" cc: pgsql-performance@postgresql.org Subject: Re: Can't drop tablespace or user after disk gone In-reply-to: <4613D5BC.2070607@modgraph-usa.com> References: <9C0858F5-0A48-4AF9-80FF-E4BA14F0F965@ohloh.net> <4613053F.5070401@polimetrix.com> <4613C14A.4020703@commandprompt.com> <4613C54C.4050207@kaltenbrunner.cc> <4613C6F1.3090009@commandprompt.com> <4613CB60.6030505@kaltenbrunner.cc> <4613D5BC.2070607@modgraph-usa.com> Comments: In-reply-to "Craig A. James" message dated "Wed, 04 Apr 2007 09:43:40 -0700" Date: Wed, 04 Apr 2007 12:57:13 -0400 Message-ID: <22928.1175705833@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/79 X-Sequence-Number: 23956 "Craig A. James" writes: > I had a 'scratch' database for testing, which I deleted, and then disk went out. No problem, no precious data. But now I can't drop the tablespace, or the user who had that as the default tablespace. > I thought about removing the tablespace from pg_tablespaces, but it seems wrong to be monkeying with the system tables. I still can't drop the user, and can't drop the tablespace. What's the right way to clear out Postgres when a disk fails and there's no reason to repair the disk? Probably best to make a dummy postgres-owned directory somewhere and repoint the symlink at it, then DROP TABLESPACE. CVS HEAD has recently been tweaked to be more forgiving of such cases... regards, tom lane