On Wed, Dec 11, 2024 at 2:08 PM vignesh C <vignes...@gmail.com> wrote:
>
> On Wed, 11 Dec 2024 at 11:21, Shubham Khanna
> <khannashubham1...@gmail.com> wrote:
> >
> > On Wed, Dec 11, 2024 at 4:21 AM Peter Smith <smithpb2...@gmail.com> wrote:
> >
> > I have fixed the given comments. The attached patch contains the
> > suggested changes.
>
> Since all the subscriptions are created based on the two_phase option
> provided, there is no need to store this for each database:
> @@ -53,6 +54,7 @@ struct LogicalRepInfo
>         char       *pubname;            /* publication name */
>         char       *subname;            /* subscription name */
>         char       *replslotname;       /* replication slot name */
> +       bool            two_phase;              /* two-phase enabled
> for the subscription */
>
>                 dbinfo[i].dbname = cell->val;
> +               dbinfo[i].two_phase = opt->two_phase;
>                 if (num_pubs > 0)
>
> How about we handle something like in the attached changes.
>

Thank you for pointing this out and for suggesting the changes. I
agree with your approach.
Also, I found a mistake in getopt_long and fixed it in this version of
the patch.
The attached patch contains the suggested changes.

Thanks and regards,
Shubham Khanna.

Attachment: v4-0001-Add-support-for-two-phase-commit-in-pg_createsubs.patch
Description: Binary data

Reply via email to