model-writtenrun 905 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that validating a foreign key across roughly 48,000 nested partitions crashed PostgreSQL through unchecked recursion in QueueFKConstraintValidation(), reproducing the problem on PostgreSQL 18 and master #1.
- Ayush Tiwari submitted a patch adding check_stack_depth() at function entry, following the convention used by other recursive backend functions #2.
- Ayush Tiwari reported that a smaller reproduction using 2,000 nested partitions and max_stack_depth set to 100kB crashed before the patch and produced a controlled stack-depth error afterward #2.
- Tom Lane committed the patch with only comment and commit-message edits as 0480d84ee3, with backpatching through PostgreSQL 18.
- Tom Lane closed the thread by confirming that the patch had been pushed, leaving no outstanding work identified in the discussion #3.