Re: HOT patch - version 11 - Mailing list pgsql-patches

From Simon Riggs
Subject Re: HOT patch - version 11
Date
Msg-id 1186065452.4161.2.camel@ebony.site
Whole thread Raw
In response to Re: HOT patch - version 11  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-patches
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


pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: enable logging of start time/cookie for all backend processes
Next
From: Neil Conway
Date:
Subject: Re: Memory leak in tuplestore_end()