Re: SubTablespaces(Recursive) expected behaviour?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stepan Neretin <sncfmgg(at)gmail(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: SubTablespaces(Recursive) expected behaviour?
Date: 2024-07-28 16:32:01
Message-ID: CAKFQuwYTLOQ-cvLvrL1JbyPiN0X7=8rqA_fyqPqbV7=t2yze+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sunday, July 28, 2024, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > On Sunday, July 28, 2024, Stepan Neretin <sncfmgg(at)gmail(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2024-07-28 16:35:41 Re: Faster pg_resore with autovacuum off?
Previous Message Tom Lane 2024-07-28 16:10:10 Re: SubTablespaces(Recursive) expected behaviour?