Re: Brain dump: btree collapsing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Brain dump: btree collapsing
Date
Msg-id 13068.1045148053@sss.pgh.pa.us
Whole thread Raw
In response to Re: Brain dump: btree collapsing  (Daniel Kalchev <daniel@digsys.bg>)
List pgsql-hackers
Daniel Kalchev <daniel@digsys.bg> writes:
> ... Thus we should 'free' the index 
> pages with one VACUUM run, instead of two.

Bear in mind that the only thing that deletes index entries is ... VACUUM.
Thus what we're really discussing is whether VACUUM should delete an
index page at the same time it deletes the last entry thereon, or in a
separate pass over the index.  This is a minor implementation detail,
not something the user will really notice in terms of having to run
VACUUM multiple times to get the same effect.

Also, it will definitely take two VACUUM runs (minimum) before a
formerly-live page can enter FSM.  Once the page is marked dead (in one
run) we still need to wait for the drain interval before we can give it
to FSM (in a later run).  This is more or less analogous to the fact
that VACUUM can't remove recently-deleted heap tuples, even though they
are committed dead.  You have to wait till there's no one left that
might want to access that tuple (or index page).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Lamar Owen
Date:
Subject: Re: location of the configuration files
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: location of the configuration files