Fix logical decoding regression tests to correctly check slot existence.
authorFujii Masao <[email protected]>
Fri, 4 Apr 2025 04:09:06 +0000 (13:09 +0900)
committerFujii Masao <[email protected]>
Fri, 4 Apr 2025 04:11:27 +0000 (13:11 +0900)
commit0d22daad7e1a5abd16795590da54015aefb94848
tree7e5e142c53427d73ebbcc719785eef23ba8a7572
parenta8a9189376af5be5afab2a086fd9a9d25b23b07c
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 protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: https://postgr.es/m/OSCPR01MB149667EC4E738769CA80B7EA5F5AE2@OSCPR01MB14966.jpnprd01.prod.outlook.com
Backpatch-through: 13
src/test/recovery/t/006_logical_decoding.pl
src/test/recovery/t/010_logical_decoding_timelines.pl