Some codes refer slot()->{'slot_name'} but it is not defined - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject Some codes refer slot()->{'slot_name'} but it is not defined
Date
Msg-id OSCPR01MB149667EC4E738769CA80B7EA5F5AE2@OSCPR01MB14966.jpnprd01.prod.outlook.com
Whole thread Raw
Responses Re: Some codes refer slot()->{'slot_name'} but it is not defined
List pgsql-hackers
Dear hackers,

Cluster.pm defines a function slot()which requires a slot_name as a key
and returns attributes of the given slot, as a hash-ref. ISTM, the hash
does not contain 'slot_name'.

However, I found that some codes access it by using a key 'slot_name'. ISTM it always
becomes 'undef' thus any tests are meaningless.

It looks like that existing codes want to check the existing of given logical slots.
So, it is enough to search with key 'plugin'. The valid value is set if exists, otherwise ''.

How do you think?

Best regards,
Hayato Kuroda
FUJITSU LIMITED


Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Fix slot synchronization with two_phase decoding enabled
Next
From: Amit Langote
Date:
Subject: Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning