Re: POSIX shared memory redux - Mailing list pgsql-hackers

From Robert Haas
Subject Re: POSIX shared memory redux
Date
Msg-id BANLkTikWFAi10EaXVAhWPovLmq_D4QGjWg@mail.gmail.com
Whole thread Raw
In response to Re: POSIX shared memory redux  (A.M. <agentm@themactionfaction.com>)
Responses Re: POSIX shared memory redux  ("A.M." <agentm@themactionfaction.com>)
Re: POSIX shared memory redux  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, Apr 10, 2011 at 5:03 PM, A.M. <agentm@themactionfaction.com> wrote:
> To ensure that no two postmasters can startup in the same data directory, I use fcntl range locking on the data
directorylock file, which also works properly on (properly configured) NFS volumes. Whenever a postmaster or postmaster
childstarts, it acquires a read (non-exclusive) lock on the data directory's lock file. When a new postmaster starts,
itqueries if anything would block a write (exclusive) lock on the lock file which returns a lock-holding PID in the
casewhen other postgresql processes are running. 

This seems a lot leakier than what we do now (imagine, for example,
shared storage) and I'm not sure what the advantage is.  I was
imagining keeping some portion of the data in sysv shm, and moving the
big stuff to a POSIX shm that would operate alongside it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Зотов Роман
Date:
Subject: Re: Prefered Types
Next
From: "A.M."
Date:
Subject: Re: POSIX shared memory redux