Re: Resurrecting per-page cleaner for btree - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: Resurrecting per-page cleaner for btree
Date
Msg-id 20060725162743.5D1B.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Whole thread Raw
In response to Re: [PATCHES] Resurrecting per-page cleaner for btree  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Resurrecting per-page cleaner for btree  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I think the only serious objection to this would be that it'd mean that
> tuples that should have an index entry might not have one.

This can occurs when we do REINDEX after DELETE, because dead tuples are
excluded on REINDEX. So we cannot guarantee that all heap tuples have
corresponding index entries. Vacuumers should not suppose their existence.

But I see the change is confusable, too.
I'll add more comments.


# CREATE TABLE test (i int);
# INSERT INTO test SELECT generate_series(1, 1000);
# CREATE INDEX test_idx ON test (i);
# DELETE FROM test WHERE i % 10 = 0;
# REINDEX INDEX test_idx;

# SELECT tuple_count, dead_tuple_count FROM pgstattuple('test');tuple_count | dead_tuple_count 
-------------+------------------        900 |              100

# SELECT tuple_count, dead_tuple_count FROM pgstattuple('test_idx');tuple_count | dead_tuple_count 
-------------+------------------        900 |                0

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: Units in postgresql.conf -- How to report?
Next
From: Gevik Babakhani
Date:
Subject: root/administartor user check option.