Re: cannot drop a tablespace which never exists in pg_tablespace

From: Bharani SV-forum <esteembsv-forum(at)yahoo(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Subject: Re: cannot drop a tablespace which never exists in pg_tablespace
Date: 2024-12-20 16:09:56
Message-ID: 1392047062.5689697.1734710997053@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian

initially i had created tblspace outside pg_data env variablee.g PG_DATA env variable is defined to /XXX/YYYY/ABC/15/data
the tablespace was created under   /XXX/YYYY/ABC/15/tblspace/<<tbl_spcname>>/assume tablespace name is abc_data
cd /XXX/YYYY/ABC/15/tblspace/abc_data/ls -atldrwxr-x---. 2 postgres postgres  6 Dec 19 22:08 PG_15_202209061
 ls -altRdrwxr-x---. 2 postgres postgres  6 Dec 19 22:08 PG_15_202209061
i reconfirmedSELECT * FROM pg_tablespace ; oid  |  spcname   | spcowner | spcacl | spcoptions------+------------+----------+--------+------------ 1663 | pg_default |       10 |        | 1664 | pg_global  |       10 |        |
not having any entry about tablespace abc_data
Can you guide

On Thursday, December 19, 2024 at 06:46:33 PM EST, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:

On 12/19/24 15:36, Bharani SV-forum wrote:
>
> cannot drop a tablespace which never exists in pg_tablespace
>
> I remember i had create previously an tablespace named " mq_data" , but
> cannot find in pg_tablespace listing.
>
> if i try to create the same tablespace name, it is giving error as "
> already in use as a tablespace"
> how to force drop the pointer entry and the tablespace from postgres

From:

https://www.postgresql.org/docs/current/manage-ag-tablespaces.html

"The directory $PGDATA/pg_tblspc contains symbolic links that point to
each of the non-built-in tablespaces defined in the cluster."

Is there a symlink at the above location?

Does the directory in the image have files?

>
> Inline image
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

Attachment Content-Type Size
image/png 67.3 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-12-20 16:41:54 Re: Intermittent errors when fetching cursor rows on PostgreSQL 16
Previous Message Luca Ferrari 2024-12-20 15:57:53 passing a pointer from a BackgroundWorker to a DynamicBackgroundWorker