Re: New WAL record to detect the checkpoint redo location
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-09-20T20:20:08Z
Lists: pgsql-hackers
Attachments
- v6-0001-Unify-two-isLogSwitch-tests-in-XLogInsertRecord.patch (application/octet-stream) patch v6-0001
- v6-0002-Minimally-add-XLOG_CHECKPOINT_REDO.patch (application/octet-stream) patch v6-0002
- v6-0003-WIP-Insert-XLOG_CHECKPOINT_REDO-at-the-redo-point.patch (application/octet-stream) patch v6-0003
On Mon, Sep 18, 2023 at 2:57 PM Robert Haas <robertmhaas@gmail.com> wrote: > I've been brainstorming about this today, trying to figure out some > ideas to make it work. Here are some patches. 0001 refactors XLogInsertRecord to unify a couple of separate tests of isLogSwitch, hopefully making it cleaner and cheaper to add more special cases. 0002 is a very minimal patch to add XLOG_CHECKPOINT_REDO without using it for anything. 0003 modifies CreateCheckPoint() to insert an XLOG_CHECKPOINT_REDO record for any non-shutdown checkpoint, and modifies XLogInsertRecord() to treat that as a new special case, wherein after inserting the record the redo pointer is reset while still holding the WAL insertion locks. I've tested this to the extent of running the regression tests, and I also did one (1) manual test where it looked like the right thing was happening, but that's it, so this might be buggy or perform like garbage for all I know. But my hope is that it isn't buggy and performs adequately. If there's any chance of getting some comments on the basic design choices before I spend time testing and polishing it, that would be very helpful. Thanks, -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
During online checkpoints, insert XLOG_CHECKPOINT_REDO at redo point.
- afd12774ae89 17.0 landed
-
Unify two isLogSwitch tests in XLogInsertRecord.
- df9a3d4e9994 17.0 landed