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.
regards, tom lane