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 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend