You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Improve the IndexVacuumInfo/IndexBulkDeleteResult API to allow somewhat sane
behavior in cases where we don't know the heap tuple count accurately; inparticular partial vacuum, but this also makes the API a bit more usefulfor ANALYZE. This patch adds "estimated_count" flags to both structs sothat an approximate count can be flagged as such, and adjusts the logicso that approximate counts are not used for updating pg_class.reltuples.This fixes my previous complaint that VACUUM was putting ridiculous valuesinto pg_class.reltuples for indexes. The actual impact of that bug islimited, because the planner only pays attention to reltuples for an indexif the index is partial; which probably explains why beta testers hadn'tnoticed a degradation in plan quality from it. But it needs to be fixed.The whole thing is a bit messy and should be redesigned in future, becausereltuples now has the potential to drift quite far away from reality whena long period elapses with no non-partial vacuums. But this is as good asit's going to get for 8.4.