Re: Creating a tablespace directory in recovery - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Creating a tablespace directory in recovery
Date
Msg-id 603c8f070904301814g2ebed9cck90f1c54e36f3e4c6@mail.gmail.com
Whole thread Raw
In response to Creating a tablespace directory in recovery  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Creating a tablespace directory in recovery  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Thu, Apr 30, 2009 at 3:58 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> Does anyone know why a tablespace directory isn't automatically
> created in recovery? I think that it's troublesome to create all the
> directories before recovery.

Well, there's some chance that if the directories don't exist, it's
because you haven't troubled to mount the correct partitions.  And in
that case just blindly creating the directories will possibly lead to
a series of unfortunate events.

I generally think that it's not a good idea for PG to create
directories outside $PGDATA.  I didn't much like the recent change
where (AIUI) we follow the symlink and create a directory in the right
place to be the target thereof.  Those kinds of things strike me as
footguns waiting to go off.  If something is not right, I would rather
have the system complain to me and stop than just do something that
might not be right.  It's easier to fix my init scripts if PG is too
dumb than to work around PG trying to be too smart.

...Robert


pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: Restore deleted rows
Next
From: Andrew Dunstan
Date:
Subject: windows shared memory error