Re: create tablespace fails silently, or succeeds improperly

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: create tablespace fails silently, or succeeds improperly
Дата
Msg-id 24654.1287431458@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: create tablespace fails silently, or succeeds improperly  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: create tablespace fails silently, or succeeds improperly  (Bruce Momjian <bruce@momjian.us>)
Re: create tablespace fails silently, or succeeds improperly  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: create tablespace fails silently, or succeeds improperly  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Oct 18, 2010 at 3:21 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Given the use of the version-numbered subdirectory, I see no real merit
>> in insisting that the parent directory be empty anyway. �It'd be
>> precisely analogous to "initdb -D /foo/bar/data" insisting that /foo/bar
>> be empty, which we have never done and nobody's ever suggested would be
>> a good idea.

> There aren't a lot of sane use cases for storing other bits of data
> inside either $PGDATA or one of your tablespace directories.
> However...  I guess you might have something like an empty lost+found
> directory if you're creating the tablespace directly on top of a mount
> point, and perhaps there's a good argument that that shouldn't
> interfere.  Or, I think I've run across NAS devices where every
> directory on the system contains a subdirectory called .snapshot, or
> something like that.  So maybe insisting on empty isn't right after
> all.

Yeah.  We have gotten complaints in the past from people who tried to
specify a mount point as a tablespace, and it failed because of
lost+found or the mount dir being root-owned.  We've told them to make a
subdirectory, but that always seemed like a workaround.  With the new
layout there's no longer any strong reason to prevent this case from
working.

Basically, I'm thinking that given CREATE TABLESPACE LOCATION '/foo/bar'
the creation and properties of /foo/bar/PG_9.0_201004261 ought to be
handled *exactly* the way that the -D target directory of initdb is.
We have more than ten years experience behind the assertion that we're
dealing with that case in a good way.  We should transfer that behavior
over to tablespace directories rather than inventing something that
works a shade differently.

Barring objections, I'll go make it work that way in HEAD and 9.0.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: knngist - 0.8
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Creation of temporary tables on read-only standby servers