Re: POSIX shared memory redux

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: POSIX shared memory redux
Date: 2011-04-13 06:06:11
Message-ID: 26794.1302674771@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"A.M." <agentm(at)themactionfaction(dot)com> writes:
> On Apr 11, 2011, at 7:13 PM, Tom Lane wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> I mean I'm not convinced that fcntl() locking will be as reliable.

>> I'm not either. Particularly not on NFS.

> Is there an example of a recent system where fcntl is broken (ignoring NFS)?

Well, the fundamental point is that "ignoring NFS" is not the real
world. We can't tell people not to put data directories on NFS,
and even if we did tell them not to, they'd still do it. And NFS
locking is not trustworthy, because the remote lock daemon can crash
and restart (forgetting everything it ever knew) while your own machine
and the postmaster remain blissfully awake.

None of this is to say that an fcntl lock might not be a useful addition
to what we do already. It is to say that fcntl can't just replace what
we do already, because there are real-world failure cases that the
current solution handles and fcntl alone wouldn't.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrian von Bidder 2011-04-13 07:01:30 Re: Postgre inner work question
Previous Message Shigeru Hanada 2011-04-13 02:23:00 Re: WAL, xl_heap_insert and tuple oid mystry