Re: Shared disk storage - Mailing list pgsql-general

From Tom Lane
Subject Re: Shared disk storage
Date
Msg-id 23723.1126066759@sss.pgh.pa.us
Whole thread Raw
In response to Re: Shared disk storage  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Shared disk storage
Re: Shared disk storage
List pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:
>   "Jim C. Nasby" <jnasby@pervasive.com> wrote:
>> Maybe it would be better to keep this in PGDATA (or even a duplicate
>> copy). Holding a write lock on the file should also help ensure that you
>> can tell if it's stale or not.

> And the end user can do that if they know to look for it. What you get by
> default is going to come from the distro vender and they may decide to
> put it in /var/run no matter what the default is when you build from source.

Well, if you know any vendors who move postmaster.pid out of the PGDATA
directory, let us know so we can knock some sense into their heads.
postmaster.pid is specifically a lock on the directory, and moving it
seriously weakens the strength of the lock.

Having said that, I'm not sure I believe in filesystem locks as doing
much to improve security in the case of multiple hosts attached to a SAN
filesystem.  Does the locking work at all across hosts, and if it does,
does the lock get released reasonably promptly if the owning host
crashes?  This seems like a there's-no-free-lunch situation.

            regards, tom lane

pgsql-general by date:

Previous
From: Chris Browne
Date:
Subject: Re: How to write jobs in postgresql
Next
From: Ben Grimm
Date:
Subject: Re: fix pg_autovacuum