model-writtenrun 7751 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dimitri NĂ¼scheler reported that upgrading from PostgreSQL 12.5 to 13.1 caused GIN-backed negated prefix searches to return excluded terms, while sequential scans remained correct #1.
- Dimitri supplied the missing index definition and bisect scripts #2, established that positive prefix searches also returned incorrect matches #3, and provided anonymized data with a reproducer #4.
- Tom Lane traced the failure to lossy GIN results whose TS_MAYBE outcome was discarded by boolean evaluation, and posted a patch exposing TS_execute_ternary to the GIN callers; he omitted a regression test because reproducing the lossy bitmap required too much data for a practical test #5.
- Tom revised the patch to remove the separate recheck flag from checkcondition_gin, explaining that ternary evaluation alone could avoid unnecessary heap visits when another query branch proved a match #6.
- Dimitri applied the revised patch and confirmed that it fixed the original test case on his private data #7.
- Tom committed the revised patch with only declaration ordering and comment edits as 38bb3aef35, back-patched the fix to PostgreSQL 13, and closed the thread by confirming it was pushed #8.