Re: Test "tablespace" fails during `make installcheck` on master-replica setup

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Test "tablespace" fails during `make installcheck` on master-replica setup
Дата
Msg-id CAB7nPqSn5jS3b9OjSr2MfbZtGtgvd7UUNTtYHbWDtgcH+xatwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Test "tablespace" fails during `make installcheck` on master-replica setup  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Dec 8, 2016 at 12:06 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Stephen Frost <sfrost@snowman.net> writes:
>> It would be really nice if we would detect that some other postmaster is
>> already using a given tablespace directory and to throw an error and
>> complain rather than starting up thinking everything is fine.
>
> In principle, we could have the postmaster run through $PGDATA/pg_tblspc
> and drop a lockfile into each referenced directory.  But the devil is in
> the details --- in particular, not sure how to get the right thing to
> happen during a CREATE TABLESPACE.  Also, I kinda doubt that this is going
> to fix anything for the replica-on-same-machine problem.

That's where having a node-based ID would become helpful, which is
different from the global system ID. Ages ago when working on
Postgres-XC, we took care of this problem by appending to the
tablespace folder name, the one prefixed with PGXX, a suffix using a
node name. When applying this concept to PG, we could have standbys to
set up this node ID each time recovery is done using a backup_label.
This won't solve the problem of tablespaces already created, that
should be handled by users when taking the base backup by remapping
them. But it would adress the problems for newly-created ones.
-- 
Michael



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Back-patch use of unnamed POSIX semaphores for Linux?
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Separate connection handling from backends