From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Ajin Cherian <itsajin(at)gmail(dot)com> |
Cc: | Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] logical decoding of two-phase transactions |
Date: | 2020-12-17 03:42:52 |
Message-ID: | CAA4eK1J-4U38g4OegSvvg2+9_w3g6OPdtZzkbDhxdDWyLjimfQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 17, 2020 at 9:02 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Dec 17, 2020 at 7:02 AM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
> >
> >
> > I have reviewed the changes, did not have any new comments.
> > While testing, I found an issue in this patch. During initialisation,
> > the pg_output is not initialised fully and the subscription parameters
> > are not all read. As a result, ctx->twophase could be
> > set to true , even if the subscription does not specify so. For this,
> > we need to make the following change in pgoutput.c:
> > pgoutput_startup(), similar to how streaming is handled.
> >
> > /*
> > * This is replication start and not slot initialization.
> > *
> > * Parse and validate options passed by the client.
> > */
> > if (!is_init)
> > {
> > :
> > :
> > }
> > else
> > {
> > /* Disable the streaming during the slot initialization mode. */
> > ctx->streaming = false;
> > + ctx->twophase = false
> > }
> >
>
> makes sense.
>
On again thinking about this, I think it is good to disable it during
slot initialization but will it create any problem because during slot
initialization we don't stream any xact and stop processing WAL as
soon as we reach CONSISTENT_STATE? Did you observe any problem with
this?
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2020-12-17 03:54:58 | Re: \gsetenv |
Previous Message | Amit Kapila | 2020-12-17 03:32:32 | Re: [HACKERS] logical decoding of two-phase transactions |