On Wed, 2007-08-01 at 21:09 +0100, Heikki Linnakangas wrote: > In heap_page_prune_defrag, it would be better to do the test for > BufferIsLockedForCleanup right after acquiring the lock. The longer the > delay between those steps, the bigger the chances that someone pins the > page and starts to wait for the buffer lock, making us think that we > didn't get the cleanup lock, though we actually did. Maybe a nicer > solution would be to have another version of ConditionalLockBuffer with > three different return values: didn't get lock, got exclusive lock, or > got cleanup lock.
Yeh, 3-value return seems neatest way. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly