| From: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> |
|---|---|
| To: | Japin Li <japinli(at)hotmail(dot)com> |
| Cc: | surya poondla <suryapoondla4(at)gmail(dot)com>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication |
| Date: | 2026-03-26 06:05:37 |
| Message-ID: | CAE9k0Pn_8wc+KzeebAdRV0DGov-LfxdM_0=b6Xnka82FvfaYpQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| v20260326-0001-Add-FIRST-N-and-ANY-N-syntax-support-to-synchronized.patch | application/octet-stream | 50.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2026-03-26 06:10:58 | Re: Skipping schema changes in publication |
| Previous Message | Zhijie Hou (Fujitsu) | 2026-03-26 05:44:01 | RE: Initial COPY of Logical Replication is too slow |