Re: Tablespaces in the data directory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tablespaces in the data directory
Date: 2012-12-01 17:56:17
Message-ID: 17365.1354384577@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-12-01 18:27:08 Re: ALTER TABLE ... NOREWRITE option
Previous Message Tom Lane 2012-12-01 17:14:37 Re: --single-transaction hack to pg_upgrade does not work