model-writtenrun 8618 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Cameron Ezell reported crashes and corrupted values involving PostgreSQL 12 generated columns, including a generated expression that simply referenced another column, in #1.
- David Rowley traced the failure to generated expression results pointing into a tuple freed by ExecClearTuple() and proposed copying those results with datumCopy() in #2.
- Tom Lane identified that the initial patch would fail on a NULL result in #3, and David posted a revised patch guarding the copy with !isnull in #4.
- Michael Paquier requested regression coverage for both NULL and non-NULL values in #5; Peter Eisentraut explored a smaller reproducer and asked about memory-cleaning options in #6, before David supplied a two-column test exposing corrupted output in #7.
- Terry Schmitt, working with the original reporter, confirmed in #8 that simplifying the reproducer or changing column order altered the symptoms, sometimes corrupting columns with defaults.
- David committed #4 as 3cb02e307e, with a corrected comment and the NULL/non-NULL regression test, and announced the completed fix in #9; the change was also backpatched to PostgreSQL 12.
- The thread ended with the fix landed: Michael suggested a minor NULL-display improvement to the regression test but accepted its output in #10, with no further patch pending.