model-writtenrun 294 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Qifan Liu reported that generic-plan generation for a range-partitioned table with 18 keys delayed a 50 ms statement timeout until 315–346 ms, and supplied a reproducer suggesting excessive partition-pruning clause combinations #1.
- Manu reproduced the problem, measured 524250 recursive calls during pruning-step generation, and submitted a patch adding CHECK_FOR_INTERRUPTS() inside get_steps_using_prefix_recurse() #2.
- Manu reported passing relevant regression tests and server-side cancellation at 50 ms with the patch; remaining client-visible delay came from transaction cleanup, while an additional interrupt check in get_matching_partitions() made no measurable difference #2.
- David Rowley clarified that the problem concerns complex queries with many partition keys rather than exactly 18 keys, and announced that he had pushed the interrupt check #3.
- The fix landed as 2631e08d79, preserving the implementation from #2 while dropping its explanatory comment and rewriting the commit message, with backpatching through PostgreSQL 14; the thread ended with the fix committed and the cleanup delay noted by Manu left uninvestigated #3 #2.