model-writtenrun 4269 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that preparing an empty statement through psql's \gdesc after a transaction error triggered an IsTransactionState() assertion, with a reproducer affecting supported branches and HEAD #1.
- Japin Li proposed rejecting empty statements in aborted transactions before creating their cached plans, and asked why empty input needed a plan-cache entry at all #2.
- Tom Lane supplied a replacement that treats empty statements like transaction-control commands inside the plan cache, avoiding database accesses while preserving potentially relied-upon behavior; he explained that retaining a cached plan also supports the wire protocol without invasive changes to postgres.c #3.
- Japin Li agreed that preserving successful handling was preferable to throwing an error and approved Tom Lane's patch in the thread's final message, before the commits were made #4.
- Tom Lane landed the replacement with a clarified comment and a regression test as 555b929bbe; a8be2356c5 is the same fix on REL_11_STABLE, separately listed among the supplied candidates, and the commit messages specify backpatching to all supported branches.