Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication - Mailing list pgsql-hackers

From Ashutosh Sharma
Subject Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication
Date
Msg-id CAE9k0Pn_8wc+KzeebAdRV0DGov-LfxdM_0=b6Xnka82FvfaYpQ@mail.gmail.com
Whole thread
In response to Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication  (Japin Li <japinli@hotmail.com>)
Responses Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication
List pgsql-hackers
Hi Japin,

> Thanks for updating the patch.  A minor nitpick:
>
> 1.
> +typedef enum
> +{
> +       SS_SLOT_NOT_FOUND,              /* slot does not exist */
> +       SS_SLOT_LOGICAL,                /* slot is logical, not physical */
> +       SS_SLOT_INVALIDATED,    /* slot has been invalidated */
> +       SS_SLOT_INACTIVE,               /* slot is inactive (standby not connected) */
> +       SS_SLOT_LAGGING                 /* slot exists and is active but has not caught up */
> +} SyncStandbySlotsState;
>
> IIRC, trailing commas are now used after the last enum.
>

Yes, I could see that in some of the lately added enums. Thanks for
raising this point, it has been addressed in the attached patch.

> 2.
> +       slot_states = (SyncStandbySlotsStateInfo *)
> +               palloc(sizeof(SyncStandbySlotsStateInfo) * synchronized_standby_slots_config->nslotnames);
>
> With palloc_array() now available, it would be preferable.
>

Makes sense. The attached patch addresses this too.

--
With Regards,
Ashutosh Sharma.

Attachment

pgsql-hackers by date:

Previous
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Initial COPY of Logical Replication is too slow
Next
From: Amit Kapila
Date:
Subject: Re: Skipping schema changes in publication