Hi,

On Tue, Nov 17, 2026 at 02:14:15PM -0800, Masahiko Sawada wrote:
> On Tue, Nov 17, 2026 at 12:14 AM Bertrand Drouvot
> <[email protected]> wrote:
> >
> > Hi,
> >
> > On Mon, Nov 16, 2026 at 11:05:00AM -0800, Masahiko Sawada wrote:
> > >
> > > I've attached the updated patches.
> >
> > Thanks!
> >
> > I did not look in details but I have a question. I'm wondering what would 
> > happen
> > with an unpatched publisher when both messages and streaming are enabled. 
> > Suppose
> > a message is emitted in a subtransaction that is later aborted. The 
> > publisher
> > sends the top level XID with the message, whereas STREAM ABORT refers to the
> > subtransaction XID. IIUC, the patched subscriber would therefore not 
> > discard that
> > message.
> >
> > Should 0002 handle this case somehow?
> 
> Good point. In that case, the subscriber would apply the message when
> the top-level transaction commits, even though the subtransaction that
> emitted it was rolled back.

Yeah, thanks for confirming.

> 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?

Regards,

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


Reply via email to