Re: Creating a tablespace directory in recovery

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Creating a tablespace directory in recovery
Date: 2009-05-01 01:14:17
Message-ID: 603c8f070904301814g2ebed9cck90f1c54e36f3e4c6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 30, 2009 at 3:58 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chuck McDevitt 2009-05-01 01:37:45 UHC as a server encoding?
Previous Message Andrew Dunstan 2009-04-30 23:59:43 windows shared memory error