Re: Add a hook for handling logical decoding messages on subscribers.

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Zhijie Hou <houzhijie22(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add a hook for handling logical decoding messages on subscribers.
Date: 2026-11-19 10:31:25
Message-ID: CAA4eK1JAO8mkn47QOqu1JJgbuQ90W6yT8uMBbbarqSAmt7WJSg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 17, 2026 at 12:35 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Sun, Nov 15, 2026 at 9:13 AM Zhijie Hou <houzhijie22(at)gmail(dot)com> wrote:
> >
>
> > BTW, since we are changing the callback signature anyway, another wild
> > idea would be to pass ReorderBufferChange directly instead so that it is
> > fully consistent with the other change callbacks. That said, it would
> > require more changes in third-party output plugins, so I don't insist on
> > it if you disagree — just sharing for reference.
>
> It seems overkill to me. For non-transactional messages, we don't
> create a ReorderBufferChange for them, so we would have to allocate
> one just for the callback and copy the prefix and the message into it.
> We would still need a separate transactional argument, so I guess it
> would not help us pass more information than the xid does.
>

+1. I also thought about it but didn't see this as an improvement as
we still won't be able to remove the existing parameter like prefix
which we are separately passing extracting them from
ReorderBufferChange.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2026-11-19 10:33:06 Re: Initial table sync copies the whole table when it is no longer published
Previous Message Chengpeng Yan 2026-11-19 10:30:37 Re: [PATCH] Fix encoding-dependent LIKE/regex selectivity estimates