pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Add TAP tests to check replication slot advance during the check 2+ messages / 1 participants [nested] [flat]
* pgsql: Add TAP tests to check replication slot advance during the check @ 2025-06-14 01:28 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Alexander Korotkov @ 2025-06-14 01:28 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 17 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/eb124c3d6deb5d0c7a588d847e3840bcc2cd0dcc Modified Files -------------- src/backend/access/transam/xlog.c | 4 + src/backend/replication/logical/logical.c | 18 +++ src/test/recovery/meson.build | 2 + src/test/recovery/t/046_checkpoint_logical_slot.pl | 139 +++++++++++++++++++++ .../recovery/t/047_checkpoint_physical_slot.pl | 133 ++++++++++++++++++++ 5 files changed, 296 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Add TAP tests to check replication slot advance during the check @ 2025-06-14 01:29 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Alexander Korotkov @ 2025-06-14 01:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 17 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/32ab0fd55da5b667a25e56bd74e258bb8eca6cf3 Modified Files -------------- src/backend/access/transam/xlog.c | 4 + src/backend/replication/logical/logical.c | 18 +++ src/test/recovery/meson.build | 2 + src/test/recovery/t/046_checkpoint_logical_slot.pl | 139 +++++++++++++++++++++ .../recovery/t/047_checkpoint_physical_slot.pl | 133 ++++++++++++++++++++ 5 files changed, 296 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-06-14 01:29 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-06-14 01:28 pgsql: Add TAP tests to check replication slot advance during the check Alexander Korotkov <akorotkov@postgresql.org> 2025-06-14 01:29 pgsql: Add TAP tests to check replication slot advance during the check Alexander Korotkov <akorotkov@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox