model-writtenrun 6203 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Christian Quest reported that PostgreSQL 13.4 left SP-GiST idx_scan statistics at zero while updating the per-tuple counters correctly #1.
- Tom Lane confirmed that SP-GiST lacked any pgstat_count_index_scan call and explained that its tuple and bitmap scan routines lacked a convenient first-call indicator #2.
- Tom Lane supplied a patch to increment the counter in spgrescan(), noting that this could count a rescan never followed by an actual scan, and reported that the patch behaved as expected #2.
- After checking the commit history, Tom Lane concluded that repeated rescan calls had ceased being a concern since PostgreSQL 9.1, resolving his remaining concern for supported branches in the thread's final message #3.
- The patch from #2 landed unchanged as 3778bcb39a, with backports to all supported versions and no remaining work identified in the thread.