Re: Move WAL/RMGR sequence code into its own file and header - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Move WAL/RMGR sequence code into its own file and header
Date
Msg-id cb5a7296-a27a-4b52-9c69-8a45263767c1@iki.fi
Whole thread Raw
In response to Move WAL/RMGR sequence code into its own file and header  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Move WAL/RMGR sequence code into its own file and header
List pgsql-hackers
On 27/11/2025 06:29, Michael Paquier wrote:
> Hi all,
> 
> Something that has been bugging me in the sequence code, while doing
> some recent work (cough), is the fact that it is possible to cleanly
> split the RMGR sequence code from the main sequence.c.
> 
> Please find attached a patch doing that, cleaning a bit sequence.c by
> removing some of the WAL bits in it, as of:
> - Addition of a new file sequence_xlog.c.
> - Addition of a new header, sequence_xlog.h.
> 
> SEQ_MAGIC and sequence_magic need to be moved from sequence.c to the
> new sequence_xlog.h, separating the WAL insert code with the backend
> redo parts of it, which is more consistent with other RMGRs.
> 
> I have been looking at some other parts of the backend (like the
> tablespace part), but these don't really bring a clear gain like the
> change in the attached does.

This doesn't really feel like an improvement to me, sequence.c is small 
enough as is it is. If this helps with the other work you're doing 
though, no objections.

- Heikki




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: IPC/MultixactCreation on the Standby server
Next
From: Michael Paquier
Date:
Subject: Re: Move WAL/RMGR sequence code into its own file and header