From c4e702628ba0a614c814680af3edf1d9d10d4574 Mon Sep 17 00:00:00 2001 From: Hayato Kuroda Date: Wed, 24 Sep 2025 20:25:27 +0900 Subject: [PATCH] Stop using injection_points for checkpointer --- src/test/recovery/meson.build | 3 ++- .../recovery/t/049_invalidate_new_slot.pl | 21 +++---------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/test/recovery/meson.build b/src/test/recovery/meson.build index 9f01d71dc3b..c9a5d258d24 100644 --- a/src/test/recovery/meson.build +++ b/src/test/recovery/meson.build @@ -55,7 +55,8 @@ tests += { 't/045_archive_restartpoint.pl', 't/046_checkpoint_logical_slot.pl', 't/047_checkpoint_physical_slot.pl', - 't/048_vacuum_horizon_floor.pl' + 't/048_vacuum_horizon_floor.pl', + 't/049_invalidate_new_slot.pl' ], }, } diff --git a/src/test/recovery/t/049_invalidate_new_slot.pl b/src/test/recovery/t/049_invalidate_new_slot.pl index 93b09316e5f..534bde08e30 100644 --- a/src/test/recovery/t/049_invalidate_new_slot.pl +++ b/src/test/recovery/t/049_invalidate_new_slot.pl @@ -36,6 +36,7 @@ $createslot->query_until( qr/start-create-slot/, q(\echo start-create-slot select pg_create_physical_replication_slot('standby1', true); +\q )); # Wait until the checkpoint stops right before removing WAL segments. @@ -45,28 +46,12 @@ note('injection_point is reached'); $node->advance_wal(3); -my $checkpoint = $node->background_psql('postgres'); -$checkpoint->query_safe(q{select injection_points_attach('checkpoint-before-old-wal-removal','wait')}); -$checkpoint->query_until( - qr/start-checkpoint/, - q(\echo start-checkpoint -checkpoint; -\q -)); - -# Wait until the checkpoint stops right before removing WAL segments. -note('waiting for injection_point'); -$node->wait_for_event('checkpointer', 'checkpoint-before-old-wal-removal'); -note('injection_point is reached'); +# Run CHECKPOINT to remove WAL segments +$node->safe_psql('postgres', 'CHECKPOINT'); # continue create slot command $node->safe_psql('postgres', q{select injection_points_wakeup('delay_slot_reserve_wal')}); -$createslot->quit(); - -# continue checkpoint -$node->safe_psql('postgres', q{select injection_points_wakeup('checkpoint-before-old-wal-removal')}); - # check if slot is invalidated $res = $node->safe_psql('postgres', "select invalidation_reason from pg_replication_slots where slot_name='standby1'"); -- 2.47.3