Re: HOT patch - version 11

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>, "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: HOT patch - version 11
Date: 2007-08-02 14:37:32
Message-ID: 1186065452.4161.2.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2007-08-02 14:58:45 clog_buffers to 64 in 8.3?
Previous Message Andrei Kovalevski 2007-08-02 12:57:31 Re: .NET driver

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2007-08-02 17:50:46 Re: Memory leak in tuplestore_end()
Previous Message Andrew Dunstan 2007-08-02 07:56:25 Re: enable logging of start time/cookie for all backend processes