X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2982111F610C for ; Wed, 26 Apr 2006 05:10:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 62090-02 for ; Wed, 26 Apr 2006 05:10:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id AC23F11F6201 for ; Wed, 26 Apr 2006 05:10:15 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (Taeb5.t.pppool.de [89.55.174.181]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id BF349656CD for ; Wed, 26 Apr 2006 10:11:17 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 725C3184BCBD9 for ; Wed, 26 Apr 2006 10:10:27 +0200 (CEST) Message-ID: <444F2AF2.4070906@logix-tt.com> Date: Wed, 26 Apr 2006 10:10:26 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: PostgreSQL SQL List Subject: Re: Migrating a Database to a new tablespace References: <4444D607.1000309@logix-tt.com> <444CA2F5.4030705@logix-tt.com> <444CA971.3000505@logix-tt.com> <444CB7C9.8060307@logix-tt.com> <20060425001553.GM64695@pervasive.com> <444E208C.20901@logix-tt.com> <19435.1145978379@sss.pgh.pa.us> <444E5359.5010704@logix-tt.com> <22840.1145988798@sss.pgh.pa.us> In-Reply-To: <22840.1145988798@sss.pgh.pa.us> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/178 X-Sequence-Number: 24987 Hi, Tom, Tom Lane wrote: > Match the subdirectory names against pg_database.oid --- any subdir that > doesn't correspond to any live entry in pg_database is junk and can be > flushed. Within a valid database's subdirectory, match the file names > to that database's pg_class.relfilenode (not oid!) to see if any of them > are live. Ah, that did it. Both "top level" Directories are not found in pg_database.oid, so they are leftovers from dropped databases. I deleted them, and then the tablespace could be dropped. Thanks a lot, Tom. As I said the leftovers are likely to be caused by hard kills and backend crashes, so I would not go into deeper analysis, but maybe the finding and possibly removing of such leftovers should be half-automated to assist server admins. Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org