Re: [HACKERS] New locking code

From: ocie(at)paracel(dot)com
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] New locking code
Date: 1998-02-18 20:31:15
Message-ID: 9802182031.AA01341@dolomite.paracel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter T Mount 1998-02-18 20:40:13 Re: [HACKERS] Memory leaks for large objects
Previous Message Bruce Momjian 1998-02-18 19:30:56 New locking code