From 44c1f85e696d53bb6e60ef155db1c3d787cf1f9c Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Thu, 13 Aug 2026 13:11:43 +0900 Subject: [PATCH] Add new string-based wait in 051_effective_wal_level.pl This serves as a demonstration for the new injpoint API. --- src/backend/replication/slot.c | 2 +- src/test/recovery/t/051_effective_wal_level.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index 1a0ff6820689..63ce6d278854 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -420,7 +420,7 @@ ReplicationSlotCreate(const char *name, bool db_specific, errmsg("cannot enable failover for a temporary replication slot")); } - INJECTION_POINT("replication-slot-create-begin", NULL); + INJECTION_POINT("replication-slot-create-begin", (char *) name); /* * If some other backend ran this code concurrently with us, we'd likely diff --git a/src/test/recovery/t/051_effective_wal_level.pl b/src/test/recovery/t/051_effective_wal_level.pl index 11bf4cb61345..b8b48838afeb 100644 --- a/src/test/recovery/t/051_effective_wal_level.pl +++ b/src/test/recovery/t/051_effective_wal_level.pl @@ -622,7 +622,7 @@ select pg_sync_replication_slots(); qr/create_standby5_slot/, q(\echo create_standby5_slot select injection_points_set_local(); -select injection_points_attach('replication-slot-create-begin', 'wait'); +select injection_points_attach('replication-slot-create-begin', 'wait', 'standby5_slot'); select pg_create_logical_replication_slot('standby5_slot', 'test_decoding'); )); $standby5->wait_for_event('client backend', -- 2.55.0