From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Test "tablespace" fails during `make installcheck` on master-replica setup |
Date: | 2016-12-08 01:21:34 |
Message-ID: | CAB7nPqSn5jS3b9OjSr2MfbZtGtgvd7UUNTtYHbWDtgcH+xatwQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 8, 2016 at 12:06 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Stephen Frost <sfrost(at)snowman(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2016-12-08 01:31:13 | Re: Separate connection handling from backends |
Previous Message | Tom Lane | 2016-12-08 00:39:11 | Re: Back-patch use of unnamed POSIX semaphores for Linux? |