model-writtenrun 8005 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jehan-Guillaume de Rorthais reported that cleanup-only VACUUM could reset a B-tree index's pg_class.reltuples to zero, traced this to counting a variable populated only when a bulk-delete callback exists, and suggested restoring page-item counting when the callback is absent #1.
- Peter Geoghegan confirmed the bug but initially considered using the heap tuple count, as GIN does, because page-item counts underestimate the number of heap TIDs represented by deduplicated posting lists; partial indexes complicated that alternative #2.
- Peter Geoghegan submitted a patch restoring page-item counting for cleanup-only VACUUMs, accepting the remaining inaccuracy to preserve a useful count and keep the fix suitable for backpatching to PostgreSQL 13 #3.
- Peter Geoghegan clarified that the patch leaves estimated_count unchanged so index statistics still get updated, and corrected his initial wording about that flag #4 #5.
- Peter Geoghegan committed the patch with unchanged executable logic and a shortened accuracy comment as 48e1291342, backpatched it to PostgreSQL 13, and announced the fix #6.
- The thread ended with Jehan-Guillaume de Rorthais thanking Peter Geoghegan after the commit and apologizing for not providing earlier feedback; no further patch or unresolved request followed #7.