pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Revert "Add single-item cache when looking at topmost XID of a s
Date: Sat, 28 May 2022 06:21:07 +0000
Message-ID: <E1nupow-001VdA-M4@gemulon.postgresql.org> (raw)

Revert "Add single-item cache when looking at topmost XID of a subtrans XID"

This reverts commit 06f5295 as per issues with this approach, both in
terms of efficiency impact and stability.  First, contrary to the
single-item cache for transaction IDs in transam.c, the cache may finish
by not be hit for a long time, and without an invalidation mechanism to
clear it, it would cause inconsistent results on wraparound for
example.  Second, the use of SubTransGetTopmostTransaction() for the
caching has a limited impact on performance.  SubTransGetParent() could
have more impact, though the benchmarking of the single-item approach
still needs to be proved, particularly under the conditions where SLRU
lookups are stressed in parallel with overflowed snapshots (aka more
than 64 subxids generated, for example).

After discussion with Andres Freund.

Discussion: https://postgr.es/m/20220524235250.gtt3uu5zktfkr4hv@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b4529005fd387e863bfa9eb863629b1183c0449c

Modified Files
--------------
src/backend/access/transam/subtrans.c | 18 ------------------
1 file changed, 18 deletions(-)



Message-ID: <E1nupow-001VdA-M4@gemulon.postgresql.org>
Permalink:  ../E1nupow-001VdA-M4@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nupow-001VdA-M4@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Revert "Add single-item cache when looking at topmost XID of a s
  In-Reply-To: <E1nupow-001VdA-M4@gemulon.postgresql.org>
  References: <E1nupow-001VdA-M4@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox