Re: On file locking - Mailing list pgsql-hackers

From Curt Sampson
Subject Re: On file locking
Date
Msg-id Pine.NEB.4.51.0302030423260.509@angelic.cynic.net
Whole thread Raw
In response to Re: On file locking  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: On file locking
List pgsql-hackers
On Sun, 2 Feb 2003, Tom Lane wrote:

> This all doesn't look good for using file locks in the way I had in
> mind :-( ... but considering that all these man pages seem pretty vague,
> maybe some direct experimentation is called for.

Definitely. I wonder about the NetBSD manpage quotes in the post you
followed up to, given that last time I checked flock() was implmented,
in the kernel, using fcntl(). Either that's changed, or the manpages
are unclear or lying.

This has been my experience in the past; locking semantics are subtle
and unclear enough that you really need to test for exactly what you
want at build time on every system, and you've got to do this testing
on the filesystem you intend to put the locks on. (So you don't, e.g.,
test a local filesystem but end up with data on an NFS filesystem with
different locking semantics.) That's what procmail does.

Given this, I'm not even sure the whole idea is worth persuing. (Though
I guess I should find out what NetBSD is really doing, and fix the
manual pages correspond to reality.)

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Linux.conf.au 2003 Report
Next
From: Kurt Roeckx
Date:
Subject: pg_hba.conf hostmask.