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

From Tom Lane
Subject Re: Creating a tablespace directory in recovery
Date
Msg-id 26704.1241217524@sss.pgh.pa.us
Whole thread Raw
In response to Re: Creating a tablespace directory in recovery  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> writes:
> ISTM that there is currently no unified policy of whether to
> automatically create the directory specified by an user.

I think it's reasonably consistent: we don't automatically recreate
directories that are likely to be symlinks to someplace outside PGDATA.
We don't know what special properties (like mount points) they're
supposed to have, and very likely we don't have the necessary
permissions to make them anyway.

> IMO, it's not so dangerous that postgres creates the directories,
> which doesn't overwrite or remove any existing data.

You might want to reflect on this old horror story ...
http://archives.postgresql.org/pgsql-hackers/2004-12/msg00628.php
http://archives.postgresql.org//pgsql-hackers/2004-12/msg00851.php

Creating a directory where there "should be one", and you don't know
why it's missing, can make things very seriously worse indeed.  Joe
was lucky to get anything back out of that fiasco.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: windows shared memory error
Next
From: Andrew Dunstan
Date:
Subject: Re: windows shared memory error