TransactionIdIsInProgress() cache

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: TransactionIdIsInProgress() cache
Date: 2008-02-06 14:25:26
Message-ID: 1202307926.29242.17.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

We currently have a single item cache of the last checked TransactionId,
which optimises the call to TransactionIdDidCommit() during
HeapTupleSatisfiesMVCC() and partners.

Before we call TransactionIdDidCommit() we always call
TransactionIdIsInProgress().

TransactionIdIsInProgress() doesn't check the single item cache, so even
if we have just checked for this xid, we will check it again. Since this
function takes ProcArrayLock and may be called while holding other locks
it will improve scalability if we can skip the call, for the cost of an
integer comparison.

Following patch implements fastpath in TransactionIdIsInProgress() to
utilise single item cache.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

Attachment Content-Type Size
xid_not_in_progress_cache.v1.patch text/x-patch 4.1 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message David Fetter 2008-02-06 15:45:16 Re: 2WRS [WIP]
Previous Message Dave Page 2008-02-05 19:45:21 Re: Remove pg_dump -i option (was Re: Proposed patch: synchronized_scanning GUC variable)