Re: BUG #19494: Error on transaction commit inside pipeline triggers psql's Assert - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #19494: Error on transaction commit inside pipeline triggers psql's Assert
Date
Msg-id ahfR7s1ZXC6MSC0i@paquier.xyz
Whole thread
Responses Re: BUG #19494: Error on transaction commit inside pipeline triggers psql's Assert
List pgsql-bugs
On Thu, May 28, 2026 at 12:51:38PM +0900, Michael Paquier wrote:
> I am completely sure yet, but it looks like we will need to be smarter
> with the handling of the number of piped commands by tracking them
> across the syncs in the shape of a queue, or something like that?  So
> it feels like we need to think harder about the tracking of this
> activity depending on the state of the pipeline we're in.  Or we could
> lift some of these assertions, but that would not be right to me.

Hmm.  Taking a step back this would be overcomplicating things.  As
long as we are careful to consume the synced results still in a
pipeline, it looks like we should be fine.  While digging into it, I
have found a third assertion that was triggerable with
available_results at the end of the pipeline, once I began mixing
\getresults with a deferred error.

This stuff is tricky enough that I may not have overseen all the
patterns possible, of course, at least this is progress.

Alexander, what do you think?
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #19490: Streaming standby on 16.14 stops applying WAL on MultiXactOffsetSLRU when primary is 16.8
Next
From: PG Bug reporting form
Date:
Subject: BUG #19499: Extensions Powa and Powa-archivist are missing in official download repository