RE: [BUG] Assert failure in ReorderBufferReturnTXN during logical decoding due to leaked specinsert change

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Álvaro Herrera' <alvherre@kurilemu.de>, Vishal Prasanna <vishal.g@zohocorp.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Date: 2026-02-26T03:16:32Z
Lists: pgsql-bugs
Dear Álvaro, Vishal,

> > Yes, the `specinsert` is no longer needed in
> > `ReorderBufferResetTXN()`. Updated the patch where `specinsert`
> > cleanup is now handled in the `PG_CATCH()` block of
> > `ReorderBufferProcessTXN()`, so it is always freed before the if/else
> > branch.
> 
> Please don't do this.  Changing the argument list of an exported
> function is an ABI break.  That's an OK change to do in branch master
> (to keep the interface clean), but for released branches it is not
> welcome, because it causes problems for users that have extensions that
> call the function and were compiled with its older definition.

To confirm, ReorderBufferResetTXN() seems a static function and proposed patch
does not modify *.h files. So they do not break the ABI and OK to remove, right?

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Commits

  1. logical decoding: Correctly free speculative insertion

  2. Fix memory counter update in ReorderBuffer.