model-writtenrun 5297 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Egor Chindyaskin reported that a CROSS JOIN query involving nearly 100,000 tables crashed PostgreSQL 14.5, with a backtrace showing deep recursion in transformFromClauseItem() #1.
- Richard Guo diagnosed stack overflow and proposed adding check_stack_depth() to transformFromClauseItem(), while suggesting other locations might also need checks #2.
- Richard Guo submitted a patch adding a stack-depth check at entry to transformFromClauseItem() in src/backend/parser/parse_clause.c #3.
- Tom Lane committed the patch unchanged as e07ebd4b6e, with backpatching to all supported branches.
- Tom Lane confirmed the push and explained that most parser paths already reach the stack-depth check through transformExpr; the submitted fix was complete, with other possible unchecked paths left as a possibility rather than further proposed work #4.