Re: Rework LogicalOutputPluginWriterUpdateProgress

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, Fabrice Chapuis <fabrice636861(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Petr Jelinek <petr(dot)jelinek(at)enterprisedb(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ajin Cherian <itsajin(at)gmail(dot)com>
Subject: Re: Rework LogicalOutputPluginWriterUpdateProgress
Date: 2023-03-03 02:43:06
Message-ID: CAHut+PsksiQHuv4A54R4w79TAvCu__PcuffKYY0V96e2z_sEvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 3, 2023 at 1:27 PM houzj(dot)fnst(at)fujitsu(dot)com
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Friday, March 3, 2023 8:18 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
...
> > Anyway, I think this exposes another problem. If you still want the patch to pass
> > the 'finshed_xact' parameter separately then AFAICT the first parameter (ctx)
> > now becomes unused/redundant in the WalSndUpdateProgressAndKeepalive
> > function, so it ought to be removed.
> >
>
> I am not sure about this. The first parameter (ctx) has been introduced since
> the Lag tracking feature. I think this is to make it consistent with other
> LogicalOutputPluginWriter callbacks. In addition, this is a public callback
> function and user can implement their own logic in this callbacks based on
> interface, removing this existing parameter doesn't look great to me. Although
> this patch also removes the existing skipped_xact, but it's because we decide
> to use another parameter did_write which can play a similar role.
>

Oh right, that makes sense. Thanks.

Perhaps it just wants some comment to mention that although the
built-in implementation does not use the 'ctx' users might implement
their own logic which does use it.

------
Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-03-03 02:46:10 Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Previous Message houzj.fnst@fujitsu.com 2023-03-03 02:27:49 RE: Rework LogicalOutputPluginWriterUpdateProgress