Re: file-locking and postmaster.pid - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: file-locking and postmaster.pid
Date
Msg-id 4474CAE9.3030604@dunslane.net
Whole thread Raw
In response to Re: file-locking and postmaster.pid  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: file-locking and postmaster.pid
List pgsql-hackers
Alvaro Herrera wrote:
> Alvaro Herrera wrote:
>
>   
>> Note that it may fail!  This seems to indicate that some platforms do
>> not provide either locking mechanism.
>>     
>
> (Which means the whole discussion is a waste of time)
>
>   

Umm, no, I don't think so. It will block instead of failing unless you 
request a non blocking call. Failure means someone else holds the lock.

But what Tom says about NFS is probably true, and a good enough reason 
not to trust locking in general for this purpose, I think

cheers

andrew


pgsql-hackers by date:

Previous
From: "John Jawed"
Date:
Subject: Re: Improving ALTER TYPE support
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Compression and on-disk sorting