Neil Conway wrote: > Bruce Momjian wrote: > > My guess is the existing behavior was designed to allow waking of > > multiple waiters _sometimes_ without starving of exclusive waiters. > > Well, I think the current algorithm *does* allow starvation, at least in > some situations. Consider a workload in which a new shared reader > arrives every 50 ms, and holds the lock for, say, 500 ms. If an > exclusive waiter arrives, they will starve with the current algorithm.
I thought the new readers will sit after the writer in the FIFO queue so the writer will not starve. -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings