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

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, 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-20 04:32:25
Message-ID: av/NWaZl/t6DAGvO@bdtpg
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Nov 19, 2026 at 03:42:06PM -0800, Masahiko Sawada wrote:
> On Thu, Nov 19, 2026 at 2:49 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Wed, Nov 18, 2026 at 12:13 PM Bertrand Drouvot
> > <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
> > >
> > > On Tue, Nov 17, 2026 at 02:14:15PM -0800, Masahiko Sawada wrote:
> > > > On Tue, Nov 17, 2026 at 12:14 AM Bertrand Drouvot
> > > > <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
> > >
> > > > Given that the 0001 patch is not backpatched, I think the subscriber
> > > > should request the messages option only from v20 or later publishers,
> > > > like it doesn't send the origin option to publishers older than v16.
> > > > The patch already checks the publisher version there, so we just need
> > > > to raise it from v14 to v20. What do you think?
> > >
> > > One difference with origin is that older publishers do not support that option
> > > at all, whereas v14 through v19 publishers support messages and the issue occurs
> > > only when streaming is enabled.
> > >
> > > I wonder if it would make sense to request messages from those publishers when
> > > streaming is disabled, and require v20 or later when streaming is enabled?
> > >
> >
> > We could use one of the ideas proposed or just leave as it is. It is
> > possible that there is no such use till now, so, adding more version
> > checking in the code for such things may not add much value.
>
> I'd like to keep it simple and require v20 or later regardless of the
> streaming option. Since streaming defaults to parallel, the
> subscribers would have to give up the performance benefit of
> streaming. So I don't think it's worth adding another check for them,
> as Amit said.

Yeah, that sounds reasonable to me.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sho Ito 2026-11-20 04:41:09 Re: [PATCH v1] Preserve implicit composite casts in ROW deparsing
Previous Message Roberto Mello 2026-11-20 04:02:34 Re: EXPLAIN ANALYZE CREATE TABLE AS EXECUTE runs non-SELECT prepared statements