Re: Estimation error in n_dead_tuples - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Estimation error in n_dead_tuples
Date
Msg-id 19286.1170349051@sss.pgh.pa.us
Whole thread Raw
In response to Estimation error in n_dead_tuples  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Estimation error in n_dead_tuples  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Re: Estimation error in n_dead_tuples  (Jim Nasby <decibel@decibel.org>)
List pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> I'm thinking to add "the number of vacuumed tuples" to the message from
> vacuum. The stats collector will subtract the value from n_dead_tuples
> instead of setting it to zero. This is also needed if we want to make
> some kinds of "partial" vacuum methods.

This seems awfully dangerous to me, because then you are operating on
dead reckoning forever: there will be nothing that can correct an
inaccurate rowcount estimate, and in practice that means it will diverge
arbitrarily far from reality :-(, because of the inherent inaccuracies
of the stats system.  I think the risk of that is far worse than the
relatively small (or at least bounded) error arising from tuples not
seen by vacuum.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: stack usage in toast_insert_or_update()
Next
From: Tom Lane
Date:
Subject: Re: stack usage in toast_insert_or_update()