Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Korotkov2025-06-14 00:36:04 +0000
committerAlexander Korotkov2025-06-14 00:36:04 +0000
commitca307d5cec90a4fde62a50fafc8ab607ff1d8664 (patch)
tree31b91677cb6a306ecc26352b4cf9c2d1bf9ebdb6 /src/backend/regex
parentc45a1dba0d85c7a44f29f1841afd877ba4f4c683 (diff)
Keep WAL segments by slot's last saved restart LSN
The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are removed at the end of the checkpoint. The patch introduces a new in-memory state for slots: last_saved_restart_lsn, which is used to calculate the oldest LSN for removing WAL segments. This state is updated every time with the current restart_lsn at the moment when the slot is saved to disk. This fix changes the shared memory layout. It's applied to HEAD only because we don't have to preserve ABI compatibility during the beta stage. Another fix that doesn't affect the ABI is committed to back branches. Discussion: https://postgr.es/m/1d12d2-67235980-35-19a406a0%4063439497 Author: Vitaly Davydov <v.davydov@postgrespro.ru> Author: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Diffstat (limited to 'src/backend/regex')
0 files changed, 0 insertions, 0 deletions