Re: Tablespaces in the data directory - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Tablespaces in the data directory
Date
Msg-id 17365.1354384577@sss.pgh.pa.us
Whole thread Raw
In response to Tablespaces in the data directory  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Tablespaces in the data directory  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Someone just reported a problem when they had created a new tablespace
> inside the old data directory. I'm sure there can be other issues
> caused by this as well, but this is mainly a confusing scenario for
> people now.

> As there isn't (as far as I know at least) any actual *point* in
> creating a tablespace inside the main data directory, should we
> perhaps disallow this in CREATE TABLESPACE? Or at least throw a
> WARNING if one does it?

It could be pretty hard to detect that in general (think symlinks
and such).  I guess if we're just trying to print a helpful warning,
we don't have to worry about extreme corner cases.  But what exactly
do you have in mind --- complain about any relative path?  Complain
about absolute paths that have a prefix matching the DataDir?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: --single-transaction hack to pg_upgrade does not work
Next
From: Simon Riggs
Date:
Subject: Re: ALTER TABLE ... NOREWRITE option