Re: Problem with dropping a tablespace - Mailing list pgsql-general

From Oliver Siegmar
Subject Re: Problem with dropping a tablespace
Date
Msg-id 200508020800.29034.o.siegmar@vitrado.de
Whole thread Raw
In response to Re: Problem with dropping a tablespace  (Michael Fuhr <mike@fuhr.org>)
Responses Re: Problem with dropping a tablespace  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
On Monday 01 August 2005 22:15, Michael Fuhr wrote:
> On Mon, Aug 01, 2005 at 09:28:07PM +0200, Oliver Siegmar wrote:
> > template1=# select * from pg_tablespace_databases(594611987);
> >  pg_tablespace_databases
> > -------------------------
> >  595675173
> > (1 row)
> >
> > Aha...so there seems to be a database associated to this tablespace -
> > lets see which one -
> >
> > template1=# select * from pg_database where oid = 595675173;
> >  datname | datdba | encoding | datistemplate | datallowconn |
> > datlastsysoid | datvacuumxid | datfrozenxid | dattablespace | datconfig |
> > datacl
> > ---------+--------+----------+---------------+--------------+------------
> >---+--------------+--------------+---------------+-----------+-------- (0
> > rows)
> >
> > Mhh. Nothing.
> >
> > How may I delete the tablespace manually?
>
> Perhaps a better question to ask is: why does pg_tablespace_databases()
> think that database 595675173 has objects in the tablespace?  What
> platform are you using?  If some flavor of Unix, what's the output
> of the following command?
>
> ls -alR /path/to/tablespace/directory

This directory indeed contains a subdirectory named 595675173 (the ghost's
database oid ;-))

Is it save to shutdown the postmaster, remove this directory and restart the
postmaster again? Are there any system tables that need updates after
removing the database manually?


Best

Oliver

pgsql-general by date:

Previous
From: William Bug
Date:
Subject: Inheritance vs. LIKE - need advice
Next
From: Richard Huxton
Date:
Subject: Re: Unable to Update a Record