Re: On file locking - Mailing list pgsql-hackers

From Shridhar Daithankar
Subject Re: On file locking
Date
Msg-id 200301311220.41676.shridhar_daithankar@persistent.co.in
Whole thread Raw
In response to Re: On file locking  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: On file locking  (Curt Sampson <cjs@cynic.net>)
List pgsql-hackers
On Friday 31 Jan 2003 9:56 am, you wrote:
> Kevin Brown <kevin@sysexperts.com> writes:
> But this only wins if a child process inheriting an open file also
> inherits copies of any locks held by the parent.  If not, then the
> issue is moot.  Anybody have any idea if file locks work that way?
> Is it portable??

In my experience of HP-UX and linux, they do differ. How much, I don't
remember.

I have a stupid proposal. Keep file lock aside. I think shared memory can be
kept alive even after process dies. Why not write a shared memory segment id
to a file and let postmaster check that segment. That would be much easier.

Besides file locking is implemented using setgid  bit on most unices. And
everybody is free to do what he/she thinks right with it.

May be stupid but just a thought..
Shridhar



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: postgres installation - best configuration?
Next
From: Curt Sampson
Date:
Subject: Re: postgres installation - best configuration?