Re: Problem with dropping a tablespace

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: pgsql-general(at)postgresql(dot)org, Oliver Siegmar <o(dot)siegmar(at)vitrado(dot)de>
Subject: Re: Problem with dropping a tablespace
Date: 2005-08-01 20:15:34
Message-ID: 20050801201534.GA52672@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

(Replace the path with the tablespace's directory; you'll probably
need to be the directory owner or root to run "ls" without getting
a "Permission denied" error).

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martín Marqués 2005-08-01 21:41:35 pgmonitor
Previous Message littlebutty 2005-08-01 19:38:40 Re: Tool for database design documentation?