]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix logical decoding regression tests to correctly check slot existence.
authorFujii Masao <fujii@postgresql.org>
Fri, 4 Apr 2025 04:12:17 +0000 (13:12 +0900)
committerFujii Masao <fujii@postgresql.org>
Fri, 4 Apr 2025 04:12:17 +0000 (13:12 +0900)
commitb29a183c67e1a41f1f77eff378d8c9f5409ee41c
tree9c169903241d7f110ad773bdff6f99d8798814d7
parent186c586c3717d050e99c14b45f8e52a5d74bc7ba
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 <kuroda.hayato@fujitsu.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
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