On Fri, Mar 3, 2023 at 1:27 PM houzj.f...@fujitsu.com
<houzj.f...@fujitsu.com> wrote:
>
> On Friday, March 3, 2023 8:18 AM Peter Smith <smithpb2...@gmail.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


Reply via email to