model-writtenrun 3575 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported a crash with partitionwise joins and GEQO, supplying a minimal reproducer and debugger and Valgrind evidence that UniquePath expressions referenced short-lived memory #1.
- Tom Lane reproduced the crash, confirmed the memory-context suspicion, and suggested a possible debugging mode that would expose similar lifetime mistakes outside GEQO #2.
- Tom traced the problem to build_child_join_sjinfo(), whose translated expressions could outlive their GEQO context when retained by a base-relation UniquePath; he rejected making all its output long-lived because it runs repeatedly during GEQO #3.
- Tom attached a fix that copies the expressions in create_unique_path() and also copies the short operator list for consistency, although the latter was not necessary to fix this crash #3.
- The thread ends with that patch and no independent review or follow-up on the debugging idea; it subsequently landed unchanged as a6b2a51e16, with cf807eba5d carrying the same fix to REL_12_STABLE as part of backpatching all supported branches.