Re: Surprising dead_tuple_count from pgstattuple

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Gordon Shannon <gordo169(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Surprising dead_tuple_count from pgstattuple
Date: 2010-08-07 01:11:30
Message-ID: AANLkTim0F1XV6LY6z8hFhDU4N5-6FcHh8nikEpkCF9vr@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/8/7 Gordon Shannon <gordo169(at)gmail(dot)com>:
> 1. I delete 10,000 rows.
> pgstattuple.dead_tuple_count -> 10000
>
> 2. I delete 15,000 more rows.
> pgstattuple.dead_tuple_count -> 15000 ??
>
> pgstattuple now appears to count the earlier 10K deleted tuples as no longer
> dead, but free space.

I think it's expected behavior that comes from HOT page reclaim.
The second DELETE not only deleted rows but also removed physical
tuples that were deleted in 1. Missing dead rows were pruned by HOT.

--
Itagaki Takahiro

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-07 02:44:09 pgsql: Recognize functional dependency on primary keys.
Previous Message James William Pye 2010-08-07 00:45:15 Re: [HACKERS] Trouble with COPY IN