• Amit Kapila's avatar
    Delete empty pages in each pass during GIST VACUUM. · 4e514c61
    Amit Kapila authored
    Earlier, we use to postpone deleting empty pages till the second stage of
    vacuum to amortize the cost of scanning internal pages.  However, that can
    sometimes (say vacuum is canceled or errored between first and second
    stage) delay the pages to be recycled.
    
    Another thing is that to facilitate deleting empty pages in the second
    stage, we need to share the information about internal and empty pages
    between different stages of vacuum.  It will be quite tricky to share this
    information via DSM which is required for the upcoming parallel vacuum
    patch.
    
    Also, it will bring the logic to reclaim deleted pages closer to nbtree
    where we delete empty pages in each pass.
    
    Overall, the advantages of deleting empty pages in each pass outweigh the
    advantages of postponing the same.
    
    Author: Dilip Kumar, with changes by Amit Kapila
    Reviewed-by: Sawada Masahiko and Amit Kapila
    Discussion: https://postgr.es/m/CAA4eK1LGr+MN0xHZpJ2dfS8QNQ1a_aROKowZB+MPNep8FVtwAA@mail.gmail.com
    4e514c61
README 22 KB