Re: SubTablespaces(Recursive) expected behaviour? - Mailing list pgsql-admin

From David G. Johnston
Subject Re: SubTablespaces(Recursive) expected behaviour?
Date
Msg-id CAKFQuwYTLOQ-cvLvrL1JbyPiN0X7=8rqA_fyqPqbV7=t2yze+Q@mail.gmail.com
Whole thread Raw
In response to Re: SubTablespaces(Recursive) expected behaviour?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Sunday, July 28, 2024, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sunday, July 28, 2024, Stepan Neretin <sncfmgg@gmail.com> wrote:
>> Hi, David. I have read this page several times and have not answered my
>> question. I'm probably not paying attention. Can you, I wanted to quote
>> what I'm missing out on

>  “The location must be an existing, empty directory that is owned by the
> PostgreSQL operating system user.”

Indeed, that doesn't directly answer the question, but I think the
implication is clear: we do not expect a tablespace directory to
contain anything except files that Postgres itself puts there.

Ok, so the flow is:
Mkdir data
Create tablespace data
Mkdir data/tbl2
Create tablespace /data/tbl2

Both creates meet the preconditions, and while creating unrelated files within an existing tablespace directory is frowned upon and risky it isn’t something that is going to guarantee failure or can be prohibited.

Just bite the bullet and move the first tablespace to a better location, or leave things as is since, assuming /data/tbl2 is on the same filesystem as /data, the second tablespace isn’t isolated anyway, as Tom said.

David J.

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: SubTablespaces(Recursive) expected behaviour?
Next
From: Wells Oliver
Date:
Subject: Re: Faster pg_resore with autovacuum off?