Re: Migrating a Database to a new tablespace

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: PostgreSQL SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Migrating a Database to a new tablespace
Date: 2006-04-26 08:10:26
Message-ID: 444F2AF2.4070906@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2006-04-26 15:59:18 Re: LinkedList
Previous Message Ray Madigan 2006-04-26 02:50:59 Linked List