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
Document VACUUM's soft assumption that any LP_DEAD items encounteredduring pruning will become LP_UNUSED items before VACUUM finishes up.This is integral to the accounting used by VACUUM to generate its finalreport on the table to the stats collector. It also affects how VACUUMdetermines which heap pages are truncatable. In both cases VACUUM isconcerned with the likely contents of the page in the near future, notthe current contents of the page.This state of affairs created the false impression that VACUUM's deadtuple accounting had significant difference with similar accounting usedduring ANALYZE. There were and are no substantive differences, at leastwhen the soft assumption completely works out. This is far clearer now.Also document cases where things don't quite work out for VACUUM's deadtuple accounting. It's possible that a significant number of LP_DEADitems will be left behind by VACUUM, and won't be recorded as remainingdead tuples in VACUUM's statistics collector report. This behaviordates back to commita96c41f, which taught VACUUM to run without indexand heap vacuuming at the user's request. The failsafe mechanism addedto VACUUM more recently by commit1e55e7d takes the same approach todead tuple accounting.Reported-By: Masahiko Sawada <sawada.mshk@gmail.com>Discussion:https://postgr.es/m/CAH2-Wz=Jmtu18PrsYq3EvvZJGOmZqSO2u3bvKpx9xJa5uhNp=Q@mail.gmail.com