Re: Feature: POSIX Shared memory support

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Feature: POSIX Shared memory support
Date: 2007-02-07 15:36:48
Message-ID: 45C9F210.2000805@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Alvaro Herrera wrote:
> Andrew Dunstan wrote:
>
>
>> Maybe we should look some more at that. Use of file locking was one
>> thought I had today after I saw Tom's earlier comments.
>>
>> Perl provides a moderately portable flock(), which we use in fact in
>> buildfarm to stop it from running more than one at a time on a given repo
>> copy.
>>
>
> But does it work over NFS? On my system, the flock manpage claims it
> doesn't, lockf doesn't say and fcntl also doesn't say, but the flock
> manpage says fcntl does. A lot of people runs servers on NFS, even
> though we recommend they don't. And there are those strange hybrids
> like SANs, NASes or what have you.
>
> One serious problem is that if the lock doesn't work for some reason
> like NFSness, it will fail silently, which is not acceptable.
>
>

Fair point. Perl in fact uses whatever it can from the underlying
system, preferring (I think) flock, then fcntl, then lockf. So its
flock is quite possibly not NFS safe in many cases.

cheers

andrew

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-02-07 15:41:06 Re: Feature: POSIX Shared memory support
Previous Message Andrew Dunstan 2007-02-07 15:28:50 Re: pgsql: Stamp releases notes for 8.2.3, 8.1.8, 8.0.12.