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 <[email protected]>
Suggested-by: Ashutosh Bapat <[email protected]>
Reviewed-by: Masahiko Sawada <[email protected]>
Reviewed-by: Ashutosh Bapat <[email protected]>
Discussion: 
https://postgr.es/m/CAEoWx2=pYvfRthXHTzSrOsf5_FfyY4zJyK4zV2v4W=yjuij...@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(-)

Reply via email to