Re: Tablespaces - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Tablespaces
Date
Msg-id 8520.1078289995@sss.pgh.pa.us
Whole thread Raw
In response to Re: Tablespaces  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Re: Tablespaces  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
> I was trying to be paranoid about users who have multiple postmasters on
> the same machine and want to share a table space while both systems are
> live. There'd be no mechanism to test for that situation if we didn't have
> something like a postmaster.pid file. Is this being a little too paranoid?

Hm.  AFAICS there is no safe situation in which a tablespace directory
could be shared by two different installations (== toplevel $PGDATA
directories).  I don't think we need a dynamic postmaster.pid-type lock
to protect them.  What might make sense is some sort of marker file in a
tablespace directory that links back to the owning $PGDATA directory.
CREATE TABLESPACE should create this, or reject if it already exists.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Out of space situation and WAL log pre-allocation (was Tablespaces)
Next
From: Bruce Momjian
Date:
Subject: Re: Tablespaces