On Wed, May 27, 2026 at 1:42 PM Fujii Masao <[email protected]> wrote:
>
> On Wed, May 27, 2026 at 1:31 PM SATYANARAYANA NARLAPURAM
> <[email protected]> wrote:
> > Thank you for the changes and review.
>
> When I applied the v4 patch together with Shveta's diff patch and
> ran the regression tests, the tests failed.

That is because my top-up patch lacks slot.out changes, I wanted Satya
to first confirm if the changes are acceptable to him. Attached
another top-up patch for test-output correction.

> Could pg_create_physical_replication_slot() still have the same issue
> if it throws an error after ReplicationSlotCreate() and that error is
> caught by a PL/pgSQL EXCEPTION block?
>
> Also, do maybe pg_copy_physical_replication_slot(), 
> pg_drop_replication_slot(),
> and ALTER_REPLICATION_SLOT potentially have the same issue as well?
>

pg_copy_physical_replication_slot() should not have it as the common
'copy_replication_slot' is already fixed in the patch.  I will review
the others.

thanks
Shveta
From fccb0438213a82af582f5d3a11c09a0060999565 Mon Sep 17 00:00:00 2001
From: Shveta Malik <[email protected]>
Date: Wed, 27 May 2026 16:21:02 +0530
Subject: [PATCH] test result changes

---
 contrib/test_decoding/expected/slot.out | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/test_decoding/expected/slot.out 
b/contrib/test_decoding/expected/slot.out
index f4cb234028b..3a04d2fbe67 100644
--- a/contrib/test_decoding/expected/slot.out
+++ b/contrib/test_decoding/expected/slot.out
@@ -481,6 +481,7 @@ EXCEPTION WHEN OTHERS THEN
 END;
 $$;
 NOTICE:  caught: could not access file "nonexistent_plugin_xyz": No such file 
or directory
+-- the concerned slot must not exist (it was dropped on error)
 SELECT count(*) = 0 AS slot_was_dropped FROM pg_replication_slots
     WHERE slot_name = 'regression_slot_error';
  slot_was_dropped 
@@ -488,7 +489,8 @@ SELECT count(*) = 0 AS slot_was_dropped FROM 
pg_replication_slots
  t
 (1 row)
 
-SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_t3', 
'test_decoding', true);
+-- the session is still usable
+SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_t3', 
'test_decoding', false);
  ?column? 
 ----------
  init
@@ -510,7 +512,7 @@ EXCEPTION WHEN OTHERS THEN
 END;
 $$;
 NOTICE:  caught expected error
--- the session is still healthy
+-- the session is still usable
 SELECT slot_name FROM pg_replication_slot_advance('regression_slot_t3', 
pg_current_wal_lsn());
      slot_name      
 --------------------
-- 
2.34.1

Reply via email to