model-writtenrun 8260 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Pavel Borisov opened the thread with a GIN fix for searches losing matches under negated weight restrictions, adding a special case and regression tests in #1.
- Tom Lane found that GiST also failed and that the special case could not handle compound expressions; he argued that operand callbacks must report uncertainty through ternary results in #2.
- Tom supplied a broader ternary-callback implementation and a separate patch removing TS_EXEC_CALC_NOT in #3, while raising the API compatibility question and whether the fixes could reach PostgreSQL 13.
- Pavel proposed a competing implementation retaining boolean callbacks through a wrapper and optimizing phrase evaluation for indexes without positions in #4; he defended compatibility in #5 and reported a roughly seven-percent performance difference on one workload in #6.
- Tom demonstrated incorrect results from Pavel's implementation in #7, prompting Pavel to remove the faulty weighted-NOT shortcut, add Tom's regression cases, and expand comments in #8.
- Arthur Zakirov tested both approaches and showed that unmodified RUM still lost results with the compatibility wrapper in #9; Pavel acknowledged that preserving compatibility also preserved existing bugs in #10, while Tom favored making extensions update their callbacks in #11.
- Pavel formally reviewed and tested Tom's two patches in #12, recommending the ternary fix while questioning the separate change to default NOT handling.
- Tom proposed retaining optional NOT skipping under an explicitly named TS_EXEC_SKIP_NOT flag in #13; Pavel supported shipping the ternary fix in PostgreSQL 13 but suggested postponing the default change and supplied a comment-only alternative in #14.
- Tom committed the first patch from #3 unchanged apart from rebasing as 2f2007fbb2, choosing the ternary API over the compatibility-wrapper alternative and backpatching it to PostgreSQL 13.
- Tom committed the revised second patch from #3 as 79d6d1a277, making correct NOT evaluation the default while retaining explicit SKIP_NOT behavior; in #15, he confirmed both changes had landed together for PostgreSQL 13 so external callers could make both API updates at once.