Re: Block B-Tree concept - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Block B-Tree concept
Date
Msg-id 23964.1159275070@sss.pgh.pa.us
Whole thread Raw
In response to Re: Block B-Tree concept  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: Block B-Tree concept  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: Block B-Tree concept  (Heikki Linnakangas <heikki@enterprisedb.com>)
Re: Block B-Tree concept  ("Jim C. Nasby" <jim@nasby.net>)
List pgsql-hackers
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> Tom Lane wrote:
>> VACUUM?
>> 
> There's a few options that I've thought of this far:

> 1. Whenever a tuple is found dead on page X, vacuum of the index will 
> have to go to that page again to see if there's any matching tuples left.

Anything that involves having VACUUM re-evaluate index expressions is a
nonstarter ... or have you already forgotten the optimizations we put
into 8.2 that assume, eg, no sub-transactions within a VACUUM?

> 2. Have a reference counter on index tuple that's increased on insert 
> and decreased by vacuum.

The "increase on insert" part I understand, the "decrease by vacuum"
part seems to have the same problem as #1.  How do you tell which index
entries should be changed?

> 3. Do nothing. Let index scans mark the index tuple as dead when it's 
> convenient. There's no correctness problem with just leaving dead index 
> tuples there, because you have to check the index quals on each heap 
> tuple anyway when you scan.

And we're back to routine REINDEX I guess :-(.  This doesn't seem like a
satisfactory answer.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Please to technical check of upcoming release
Next
From: Tom Lane
Date:
Subject: Re: heap_markpos and heap_restrpos