-
Notifications
You must be signed in to change notification settings - Fork 2
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5770~1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5770
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 9 files changed
- 2 contributors
Commits on May 31, 2025
-
Keep WAL segments by the flushed value of the slot's 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 idea of the patch is to get the minimal restart_lsn at the beginning of checkpoint (or restart point) creation and use this value when calculating the oldest LSN for WAL segments removal at the end of checkpoint. This idea was proposed by Tomas Vondra in the discussion. Discussion: https://postgr.es/m/flat/1d12d2-67235980-35-19a406a0%4063439497 Author: Vitaly Davydov <v.davydov@postgrespro.ru> Reviewed-by: Tomas Vondra <tomas@vondra.me> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Backpatch-through: 13
Configuration menu - View commit details
-
Copy full SHA for aa1a747 - Browse repository at this point
Copy the full SHA aa1a747View commit details -
Add TAP tests to check replication slot advance during the checkpoint
The new tests verify that logical and physical replication slots are still valid after an immediate restart on checkpoint completion when the slot was advanced during the checkpoint. This commit introduces two new injection points to make these tests possible: * checkpoint-before-old-wal-removal - triggered in the checkpointer process just before old WAL segments cleanup; * logical-replication-slot-advance-segment - triggered in LogicalConfirmReceivedLocation() when restart_lsn was changed enough to point to the next WAL segment. Discussion: https://postgr.es/m/flat/1d12d2-67235980-35-19a406a0%4063439497 Author: Vitaly Davydov <v.davydov@postgrespro.ru> Author: Tomas Vondra <tomas@vondra.me> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Backpatch-through: 17
Configuration menu - View commit details
-
Copy full SHA for cd5c138 - Browse repository at this point
Copy the full SHA cd5c138View commit details -
Remove redundant ReplicationSlotsComputeRequiredLSN calls
The function ReplicationSlotsComputeRequiredLSN is used to calculate the oldest slots' required LSN. It is called every time when restart_lsn value of any slot is changed (for example, when a slot is advancing). The slot's oldest required LSN is used to remote old WAL segments in two places - when checkpoint or restart point is created (CreateCheckPoint, CreateRestartPoint functions). Old WAL segments seems to be truncated in these two functions only. The idea of the patch is to call ReplicationSlotsComputeRequiredLSN in CreateCheckPoint or CreateRestartPoint functions only, before call of RemoveOldXlogFiles function where old WAL segments are removed. There is no obvious need to recalculate oldest required LSN every time when a slot's restart_lsn is changed. The value of the oldest required lsn can affect on slot invalidation. The function InvalidateObsoleteReplicationSlots with non zero second parameter (oldestSegno) is called in CreateCheckPoint, CreateRestartPoint functions only where slot invalidation occurs with reason RS_INVAL_WAL_REMOVED. Once we update the oldest slots' required lsn in the beginning of these functions, the proposed patch should not break the behaviour of slot invalidation function in this case.
Configuration menu - View commit details
-
Copy full SHA for f51629c - Browse repository at this point
Copy the full SHA f51629cView commit details -
[CF 5770] v7 - Slot's restart_lsn may point to removed WAL segment af…
…ter hard restart unexpectedly This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5770 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/2c1d-68344100-b7-3411b8c0@256938178 Author(s): Vitaly Davydov
Commitfest Bot committedMay 31, 2025 Configuration menu - View commit details
-
Copy full SHA for 956188c - Browse repository at this point
Copy the full SHA 956188cView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/5770~1...cf/5770