Re: [HACKERS] New locking code - Mailing list pgsql-hackers

From ocie@paracel.com
Subject Re: [HACKERS] New locking code
Date
Msg-id 9802182031.AA01341@dolomite.paracel.com
Whole thread Raw
In response to New locking code  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] New locking code
List pgsql-hackers
Bruce Momjian wrote:

[snip]
> What do people think of this patch?  Is his way better, to always put
> the readers at the front if the current lock holder is a writer?

This way seems to make sense to me because it provides two guarantees:

1) Neither readers or writers can ever be starved when trying toa
access an object.

2) The system implements a FIFO queue.  I.E. A reader can't "cut in
line" in front of a waiting writer just because the current access
mode is shared.  The operations that have been waiting the longest get
serviced first.

Ocie Mitchell

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: New locking code
Next
From: yurikn@glas.apc.org (Yurik V. Nazaroff)
Date:
Subject: Re: AW: [HACKERS] Re: Subselects open issue Nr. NEW