Tom Lane <[EMAIL PROTECTED]> 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



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to