Re: TransactionIdIsInProgress() cache - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: TransactionIdIsInProgress() cache
Date
Msg-id 200803051829.m25ITkt28662@momjian.us
Whole thread Raw
In response to TransactionIdIsInProgress() cache  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-patches
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------


Simon Riggs wrote:
> 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, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: CopyReadLineText optimization
Next
From: "Merlin Moncure"
Date:
Subject: libpq type system 0.9a