Remove assertion from PortalRunMulti
authorÁlvaro Herrera <[email protected]>
Thu, 17 Jul 2025 15:40:22 +0000 (17:40 +0200)
committerÁlvaro Herrera <[email protected]>
Thu, 17 Jul 2025 15:40:22 +0000 (17:40 +0200)
commit43cd8596275502c9e1da6024dedd90447535b371
treefc0f8d3ab88b183a82da40e32f82537078e9732a
parentafd2547ac645bc7130459da9ecf4ed6b61ae6305
Remove assertion from PortalRunMulti

We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail.  Per discussion, rather than
contort things to get a tag assigned, just remove the assertion.

Oversight in 2f9661311b83.  That commit also retained a comment that
explained logic that had been adjacent to it but diffused into various
places, leaving none apt to keep part of the comment.  Remove that part,
and rewrite what remains for extra clarity.

Bug: #18984
Backpatch-through: 13
Reported-by: Aleksander Alekseev <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Reviewed-by: Michaël Paquier <[email protected]>
Discussion: https://postgr.es/m/18984-0f4778a6599ac3ae@postgresql.org
src/backend/tcop/pquery.c