Subject: pgsql: Fix logical decoding regression tests to correctly check slot ex

From: Fujii Masao <[email-masked]>
Date: Fri, 04 Apr 2025 04:15:27 +0000

Fix logical decoding regression tests to correctly check slot existence.

The regression tests for logical decoding verify whether a logical slot
exists or has been dropped. Previously, these tests attempted to
retrieve "slot_name" from the result of slot(), but since "slot_name" was
not included in the result, slot()->{'slot_name'} always returned undef,
leading to incorrect behavior.

This commit fixes the issue by checking the "plugin" field in the result
of slot() instead, ensuring the tests properly verify slot existence.

Back-patch to all supported versions.

Author: Hayato Kuroda <[email-masked]>
Reviewed-by: Fujii Masao <[email-masked]>
Discussion: https://postgr.es/m/[email-masked]
Backpatch-through: 13

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b29a183c67e1a41f1f77eff378d8c9f5409ee41c

Modified Files
--------------
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(-)