From: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, teramoto(dot)junji(at)lab(dot)ntt(dot)co(dot)jp |
Subject: | Re: Resurrecting per-page cleaner for btree |
Date: | 2006-07-25 08:20:37 |
Message-ID: | 20060725162743.5D1B.ITAGAKI.TAKAHIRO@oss.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey E. Koposov | 2006-07-25 09:39:50 | Re: patch implementing the multi-argument aggregates (SOC |
Previous Message | jkzhao | 2006-07-25 07:13:01 | column-level privilege |
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey E. Koposov | 2006-07-25 09:39:50 | Re: patch implementing the multi-argument aggregates (SOC |
Previous Message | Tom Lane | 2006-07-25 04:52:13 | Re: pgstattuple extension for indexes |