-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/5627~1
head repository: postgresql-cfbot/postgresql
compare: cf/5627
- 6 commits
- 12 files changed
- 3 contributors
Commits on May 5, 2025
-
Add injection points to test replication slot advance
New injection points: * 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 a next WAL segment. Original patch by: Tomas Vondra <tomas@vondra.me> Modified by: Vitaly Davydov <v.davydov@postgrespro.ru> Discussion: https://www.postgresql.org/message-id/flat/1d12d2-67235980-35-19a406a0%4063439497
Configuration menu - View commit details
-
Copy full SHA for 29d8182 - Browse repository at this point
Copy the full SHA 29d8182View commit details -
Add TAP test to check logical repl slot advance during checkpoint
The test verifies that logical replication slot is still valid after immediate restart on checkpoint completion in case when the slot was advanced during checkpoint. Original patch by: Tomas Vondra <tomas@vondra.me> Modified by: Vitaly Davydov <v.davydov@postgrespro.ru> Discussion: https://www.postgresql.org/message-id/flat/1d12d2-67235980-35-19a406a0%4063439497
Configuration menu - View commit details
-
Copy full SHA for 2a712fa - Browse repository at this point
Copy the full SHA 2a712faView commit details -
Add TAP test to check physical repl slot advance during checkpoint
The test verifies that the physical replication slot is still valid after immediate restart on checkpoint completion in case when the slot was advanced during checkpoint. Discussion: https://www.postgresql.org/message-id/flat/1d12d2-67235980-35-19a406a0%4063439497
Vitaly Davydov authored and Commitfest Bot committedMay 5, 2025 Configuration menu - View commit details
-
Copy full SHA for c5b5cf6 - Browse repository at this point
Copy the full SHA c5b5cf6View commit details -
Keep WAL segments by slot's flushed restart LSN
The patch fixes the issue with unexpected removal of old WAL segments after checkpoint followed by immediate restart. The issue occurs when a slot is advanced after the start of checkpoint and before old WAL segments removal at end of 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 oldest LSN for WAL segments removal at the end of checkpoint. This idea was proposed by Tomas Vondra in the discussion. Discussion: https://www.postgresql.org/message-id/flat/1d12d2-67235980-35-19a406a0%4063439497
Vitaly Davydov authored and Commitfest Bot committedMay 5, 2025 Configuration menu - View commit details
-
Copy full SHA for 5ee12b0 - Browse repository at this point
Copy the full SHA 5ee12b0View 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.
Vitaly Davydov authored and Commitfest Bot committedMay 5, 2025 Configuration menu - View commit details
-
Copy full SHA for 58bd6a6 - Browse repository at this point
Copy the full SHA 58bd6a6View commit details -
[CF 5627] Fix oldest LSN calculation for WAL segments removal when sl…
…ots are advancing during checkpoint This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5627 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/3ea6a1-68150580-1-7b53be0@80017081 Author(s): Vitaly Davydov
Commitfest Bot committedMay 5, 2025 Loading Loading status checks…Configuration menu - View commit details
-
Copy full SHA for 1c719e3 - Browse repository at this point
Copy the full SHA 1c719e3View commit details
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/5627~1...cf/5627