On Thu, Dec 17, 2020 at 9:02 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Thu, Dec 17, 2020 at 7:02 AM Ajin Cherian <itsajin@gmail.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.