pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Consolidate replication origin session globals into a single str
Date: Wed, 28 Jan 2026 20:27:02 +0000
Message-ID: <E1vlC7x-003Faz-1e@gemulon.postgresql.org> (raw)

Consolidate replication origin session globals into a single struct.

This commit moves the separate global variables for replication origin
state into a single ReplOriginXactState struct. This groups logically
related variables, which improves code readability and simplifies
state management (e.g., resetting the state) by handling them as a
unit.

Author: Chao Li <lic@highgo.com>
Suggested-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://postgr.es/m/CAEoWx2=pYvfRthXHTzSrOsf5_FfyY4zJyK4zV2v4W=yjUij1cA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8f1e2dfe033e9a3236265c3b9f61bd226f4a8f54

Modified Files
--------------
src/backend/access/transam/twophase.c              | 32 +++++++++----------
src/backend/access/transam/xact.c                  | 36 +++++++++++-----------
src/backend/access/transam/xloginsert.c            |  6 ++--
.../replication/logical/applyparallelworker.c      |  6 ++--
src/backend/replication/logical/origin.c           | 26 ++++++++--------
src/backend/replication/logical/tablesync.c        |  4 +--
src/backend/replication/logical/worker.c           | 28 ++++++++---------
src/include/replication/origin.h                   | 11 +++++--
src/tools/pgindent/typedefs.list                   |  1 +
9 files changed, 79 insertions(+), 71 deletions(-)



Message-ID: <E1vlC7x-003Faz-1e@gemulon.postgresql.org>
Permalink:  ../E1vlC7x-003Faz-1e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vlC7x-003Faz-1e@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: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Consolidate replication origin session globals into a single str
  In-Reply-To: <E1vlC7x-003Faz-1e@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