Re: Error correction for n_dead_tuples - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Error correction for n_dead_tuples
Date
Msg-id 20070220014055.GE28395@alvh.no-ip.org
Whole thread Raw
In response to Re: Error correction for n_dead_tuples  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Error correction for n_dead_tuples  (Bruce Momjian <bruce@momjian.us>)
Re: Error correction for n_dead_tuples  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-patches
Bruce Momjian wrote:
>
> Your patch has been added to the PostgreSQL unapplied patches list at:
>
>     http://momjian.postgresql.org/cgi-bin/pgpatches
>
> It will be applied as soon as one of the PostgreSQL committers reviews
> and approves it.

Please put this on hold until we decide what to do with Heikki's patch
to update OldestXmin during vacuum.

One idea is to count the tuples actually cleared during vacuum.  Another
idea is to reread pgstat data after each OldestXmin recalculation to get
accurate dead tuple counting.  Neither of these seem very satisfying.

> ---------------------------------------------------------------------------
>
> ITAGAKI Takahiro wrote:
> > Here is a patch discussed in
> > http://archives.postgresql.org/pgsql-hackers/2007-02/msg00010.php
> >
> > Concurrent vacuum will save n_dead_tuples value at the beginning.
> > Stats collector will be subtract the value from n_dead_tuples
> > instead of setting it to zero. The statistics accuracy of n_dead_tuples
> > will be better, especially just after finish of a vacuum.
> >
> > The behavior in VACUUM FULL is not changed because concurrent updates
> > are not allowed during VACUUM FULL.


--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Error correction for n_dead_tuples
Next
From: Bruce Momjian
Date:
Subject: Re: Error correction for n_dead_tuples