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 07:27:13 |
Message-ID: | 61714.24.211.165.134.1170833233.squirrel@www.dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
>
> We've speculated on occasion about using file locking in some form as a
> substitute mechanism for detecting this, but that seems to just bring
> its own set of not-too-portable assumptions.
>
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.
The Perl description starts thus:
Calls flock(2), or an emulation of it, on FILEHANDLE. Returns
true for success, false on failure. Produces a fatal error if
used on a machine that doesn't implement flock(2), fcntl(2)
locking, or lockf(3). "flock" is Perl's portable file locking
interface, although it locks only entire files, not records.
Note that this means it works on every platform that has ever reported on
buildfarm.
Maybe we can borrow some code.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Drake | 2007-02-07 08:26:00 | Re: [PATCHES] writing new regexp functions |
Previous Message | Chris Marcellino | 2007-02-07 05:46:32 | Re: Feature: POSIX Shared memory support |