model-writtenrun 8245 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Stephen Frost reported archive-server queries that ran excessively long and ignored signals, pointing to missing interrupt checks around hlCover #1; Tom Lane favored checking interrupts inside TS_execute recursion and rejected adding that responsibility to check_stack_depth #2 #4.
- After investigating Stephen's test case, Tom identified quadratic scanning of long documents containing many occurrences of a common query word but few complete matches, and proposed limiting cover length using headline-size settings instead of adding a new user parameter to stable releases #6.
- Stephen supported the length limit while requesting that cancellation checks remain part of the fix #7, and Tom selected TS_execute_recurse for that check #8 before posting a patch combining both changes #10.
- Stephen adapted the first patch to PostgreSQL 11 and tested previously troublesome archive-server queries, confirming substantially better execution times and responsiveness to cancellation #11.
- Tom posted a revision that skipped null item pointers in hlFirstIndex and explained the complexity problem more fully #12; Stephen's final reply expressed approval without reporting further testing #13, leaving the patch awaiting Tom's announced push at the end of the thread.
- Tom subsequently committed 78e73e8754 from #12, further simplifying hlFirstIndex to a non-null pointer test; the performance fix was backpatched through PostgreSQL 9.6, with the interrupt check also applied to 9.5, while a user-configurable cover limit remained deferred.