Re: Migrating a Database to a new tablespace - Mailing list pgsql-sql

From Markus Schaber
Subject Re: Migrating a Database to a new tablespace
Date
Msg-id 444F2AF2.4070906@logix-tt.com
Whole thread Raw
In response to Re: Migrating a Database to a new tablespace  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Migrating a Database to a new tablespace  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Migrating a Database to a new tablespace
Next
From: "Ray Madigan"
Date:
Subject: LinkedList