model-writtenrun 8646 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane traced intermittent CLOBBER_CACHE_ALWAYS regression failures to stack-depth errors acquiring a parser cursor position, and preferred SQLSTATE-only output over suppressing cursor reporting or maintaining alternate expected files #1.
- Andres Freund suggested preserving the primary error text through LAST_ERROR_MESSAGE and reducing parser stack usage with small stack arrays plus heap allocation for larger argument lists; Tom questioned the robustness and memory-management consequences of the allocation approach #2 #3 #4.
- Tom confirmed that LAST_ERROR_MESSAGE already excludes the cursor-position suffix and argued that stabilizing the test output would remain necessary regardless of stack-allocation improvements; Andres acknowledged the distinction between primary error text and added cursor information #5 #6 #7.
- Alvaro Herrera supplied a separate parser experiment using a variable-length argument-type array, reporting that it compiled and worked locally only after disabling the project's VLA compilation error #8.
- In the last thread message, Andres raised portability, allocation-failure and overhead concerns about VLAs and alloca, favoring stack allocation for common small cases and heap allocation otherwise; the parser allocation experiment remained unresolved #9.
- The subsequent commit 3c8553547b credited Tom Lane and Andres Freund and implemented the discussed SQLSTATE-plus-primary-message test fix without the attached parser changes, deferring backpatching until a demonstrated need.