RE: Some codes refer slot()->{'slot_name'} but it is not defined

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Fujii Masao' <masao.fujii@oss.nttdata.com>, "'pgsql-hackers@lists.postgresql.org'" <pgsql-hackers@lists.postgresql.org>
Date: 2025-04-03T12:23:58Z
Lists: pgsql-hackers

Attachments

Dear Fujii-san,

> -is($node_primary->slot('dropme_slot')->{'slot_name'},
> -	undef, 'logical slot was actually dropped on standby');
> +is($node_primary->slot('dropme_slot')->{'plugin'},
> +	'', 'logical slot was actually dropped on standby');
> 
> This seems like a separate issue from what your patch is addressing,
> but since this test is meant to confirm that the slot was dropped
> on the standby, shouldn't node_primary be node_replica instead?

You are right. It has been missed 8 years ago, let's fix now.

BTW, the issue exists for all supported branches. How do you feel
to backpatch them? PSA all patch set.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Commits

  1. Fix logical decoding test to correctly check slot removal on standby.

  2. Fix logical decoding regression tests to correctly check slot existence.