pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rework redundant code in subtrans.c
Date: Tue, 05 Mar 2024 11:11:46 +0000
Message-ID: <E1rhSi2-002CPS-BY@gemulon.postgresql.org> (raw)

Rework redundant code in subtrans.c

When this code was written the duplicity didn't matter, but with all the
SLRU-bank stuff we just added, it has become excessive.  Turn it into a
simpler loop with no code duplication.  Also add a test so that this
code becomes covered.

Discussion: https://postgr.es/m/202403041517.3a35jw53os65@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1a2654b32b546d25e39a0c02410049559a3d4573

Modified Files
--------------
src/backend/access/transam/subtrans.c | 29 ++++++------------------
src/test/recovery/t/009_twophase.pl   | 42 +++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 22 deletions(-)



Message-ID: <E1rhSi2-002CPS-BY@gemulon.postgresql.org>
Permalink:  ../E1rhSi2-002CPS-BY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rhSi2-002CPS-BY@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Rework redundant code in subtrans.c
  In-Reply-To: <E1rhSi2-002CPS-BY@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