Optimizing TransactionIdIsCurrentTransactionId()

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Optimizing TransactionIdIsCurrentTransactionId()
Date: 2019-12-18 10:07:07
Message-ID: CANP8+jKAzzh0U2KaLtmR6urHXDysSLwow56obXZkbDcmK-Eqzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

TransactionIdIsCurrentTransactionId() doesn't seem to be well optimized for
the case when an xid has not yet been assigned, so for read only
transactions.

A patch for this is attached.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Solutions for the Enterprise

Attachment Content-Type Size
optimize_TransactionIdIsCurrentTransactionId_readonly.v1.patch application/octet-stream 867 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2019-12-18 10:13:03 RE: [PATCH] Fix possible underflow in expression (maxoff - 1)
Previous Message Amit Kapila 2019-12-18 10:06:05 Re: [HACKERS] Block level parallel vacuum