v2-master-PG17-0001-Fix-invalid-referring-of-hash-ref-for-replic.patch
application/octet-stream
Filename: v2-master-PG17-0001-Fix-invalid-referring-of-hash-ref-for-replic.patch
Type: application/octet-stream
Part: 2
Patch
Format: format-patch
Series: patch v2-0001
Subject: Fix invalid referring of hash-ref for replication slots
| File | + | − |
|---|---|---|
| src/test/recovery/t/006_logical_decoding.pl | 4 | 4 |
| src/test/recovery/t/010_logical_decoding_timelines.pl | 2 | 2 |
From de0fc201214ed02532fc90f110973a63d2f32e4f Mon Sep 17 00:00:00 2001
From: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Date: Thu, 3 Apr 2025 12:12:12 +0900
Subject: [PATCH v2] Fix invalid referring of hash-ref for replication slots
hash-ref gerenated by slot() did not have key 'slot_name', but some codes
referred it. Fix it by referring 'plugin' instead.
---
src/test/recovery/t/006_logical_decoding.pl | 8 ++++----
src/test/recovery/t/010_logical_decoding_timelines.pl | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/test/recovery/t/006_logical_decoding.pl b/src/test/recovery/t/006_logical_decoding.pl
index a5678bc4dc4..2137c4e5e30 100644
--- a/src/test/recovery/t/006_logical_decoding.pl
+++ b/src/test/recovery/t/006_logical_decoding.pl
@@ -161,8 +161,8 @@ SKIP:
is($node_primary->psql('postgres', 'DROP DATABASE otherdb'),
3, 'dropping a DB with active logical slots fails');
$pg_recvlogical->kill_kill;
- is($node_primary->slot('otherdb_slot')->{'slot_name'},
- undef, 'logical slot still exists');
+ is($node_primary->slot('otherdb_slot')->{'plugin'},
+ 'test_decoding', 'logical slot still exists');
}
$node_primary->poll_query_until('otherdb',
@@ -171,8 +171,8 @@ $node_primary->poll_query_until('otherdb',
is($node_primary->psql('postgres', 'DROP DATABASE otherdb'),
0, 'dropping a DB with inactive logical slots succeeds');
-is($node_primary->slot('otherdb_slot')->{'slot_name'},
- undef, 'logical slot was actually dropped with DB');
+is($node_primary->slot('otherdb_slot')->{'plugin'},
+ '', 'logical slot was actually dropped with DB');
# Test logical slot advancing and its durability.
# Passing failover=true (last arg) should not have any impact on advancing.
diff --git a/src/test/recovery/t/010_logical_decoding_timelines.pl b/src/test/recovery/t/010_logical_decoding_timelines.pl
index 08615f1fca8..351a9ef7bdd 100644
--- a/src/test/recovery/t/010_logical_decoding_timelines.pl
+++ b/src/test/recovery/t/010_logical_decoding_timelines.pl
@@ -94,8 +94,8 @@ is( $node_replica->safe_psql(
'postgres', q[SELECT 1 FROM pg_database WHERE datname = 'dropme']),
'',
'dropped DB dropme on standby');
-is($node_primary->slot('dropme_slot')->{'slot_name'},
- undef, 'logical slot was actually dropped on standby');
+is($node_replica->slot('dropme_slot')->{'plugin'},
+ '', 'logical slot was actually dropped on standby');
# Back to testing failover...
$node_primary->safe_psql('postgres',
--
2.43.5