• Heikki Linnakangas's avatar
    Delete empty pages during GiST VACUUM. · 7df159a6
    Heikki Linnakangas authored
    To do this, we scan GiST two times. In the first pass we make note of
    empty leaf pages and internal pages. At second pass we scan through
    internal pages, looking for downlinks to the empty pages.
    
    Deleting internal pages is still not supported, like in nbtree, the last
    child of an internal page is never deleted. That means that if you have a
    workload where new keys are always inserted to different area than where
    old keys are removed, the index will still grow without bound. But the rate
    of growth will be an order of magnitude slower than before.
    
    Author: Andrey Borodin
    Discussion: https://www.postgresql.org/message-id/B1E4DF12-6CD3-4706-BDBD-BF3283328F60@yandex-team.ru
    7df159a6
gistxlog.c 22.5 KB