pgsql: Move WAL sequence code into its own file

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Move WAL sequence code into its own file
Date: 2025-12-01 07:22:34
Message-ID: E1vPyF0-002FTA-1W@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Move WAL sequence code into its own file

This split exists for most of the other RMGRs, and makes cleaner the
separation between the WAL code, the redo code and the record
description code (already in its own file) when it comes to the sequence
RMGR. The redo and masking routines are moved to a new file,
sequence_xlog.c. All the RMGR routines are now located in a new header,
sequence_xlog.h.

This separation is useful for a different patch related to sequences
that I have been working on, where it makes a refactoring of sequence.c
easier if its RMGR routines and its core routines are split.

Reviewed-by: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Reviewed-by: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Discussion: https://postgr.es/m/aSfTxIWjiXkTKh1E@paquier.xyz

Branch
------
master

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

Modified Files
--------------
src/backend/access/rmgrdesc/seqdesc.c | 2 +-
src/backend/access/transam/rmgr.c | 2 +-
src/backend/commands/Makefile | 1 +
src/backend/commands/meson.build | 1 +
src/backend/commands/sequence.c | 76 +--------------------------------
src/backend/commands/sequence_xlog.c | 80 +++++++++++++++++++++++++++++++++++
src/bin/pg_waldump/rmgrdesc.c | 2 +-
src/include/commands/sequence.h | 18 --------
src/include/commands/sequence_xlog.h | 45 ++++++++++++++++++++
9 files changed, 132 insertions(+), 95 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-12-01 15:46:48 pgsql: Fix a strict aliasing violation
Previous Message Michael Paquier 2025-12-01 06:22:44 pgsql: Switch some date/timestamp functions to use the soft error repor