Re: Brain dump: btree collapsing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Kalchev <daniel(at)digsys(dot)bg>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Brain dump: btree collapsing
Date: 2003-02-13 14:54:13
Message-ID: 13068.1045148053@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Kalchev <daniel(at)digsys(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nigel J. Andrews 2003-02-13 15:03:09 Re: location of the configuration files
Previous Message Lamar Owen 2003-02-13 14:50:22 Re: location of the configuration files