| 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>, 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-12 09:32:44 |
| Message-ID: | CAA4eK1K3ypFDLk1R1DEx7YqCRbjNLTtJPP5+FfcX0F63rQ+Ekg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Nov 12, 2026 at 4:10 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Mon, Nov 9, 2026 at 5:21 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> > I've attached the new patches. I just updated the commit message for
> > the 0001 patch, and added some fixes and regression tests for the 0002
> > patch. Please review them.
>
> I think the 0001 patch can be pushed independently. So I'm going to
> push it to master, barring objections.
>
Few comments on 0001:
* As the parameter to stream_message callback could be a
sub-transaction which is different from other similar callbacks like
truncate and change, it would be better to add that in docs where we
describe LogicalDecodeStreamMessageCB. The one more thing which we may
consider is how to get the top txn if required by callback as the
patch did in test_decoding.
* As we are planning this as a master-only change, will it be better
if we just pass subxid as a separate parameter to keep the interface
consistent with other similar interfaces and avoid the need for
plugins to retrieve toptxn separately.
* Similar to pg_decode_stream_message, shouldn't there be a call to
stream_start if (!txndata->stream_wrote_changes). This is just a code
observation, I haven't tested it.
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nikhil Sontakke | 2026-11-12 09:56:37 | Fix CYCLE clause deparsing and dump/restore |
| Previous Message | Bertrand Drouvot | 2026-11-12 09:32:17 | Re: pgstat: Flush some statistics within running transactions, take 2 |