Skip site navigation (1) Skip section navigation (2)

Re: Estimation error in n_dead_tuples

From: Jim Nasby <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Estimation error in n_dead_tuples
Date: 2007-02-02 06:03:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Feb 1, 2007, at 10:57 AM, Tom Lane wrote:
> ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)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.

Yeah, it'd be better for vacuum to send a message stating how many  
dead rows it couldn't remove, ala:

DETAIL:  0 dead row versions cannot be removed yet.

Granted, not perfect, but better than what we have now.
Jim Nasby                                            jim(at)nasby(dot)net
EnterpriseDB      512.569.9461 (cell)

In response to

pgsql-hackers by date

Next:From: Jeremy DrakeDate: 2007-02-02 06:16:54
Subject: Re: writing new regexp functions
Previous:From: Jim NasbyDate: 2007-02-02 05:57:41
Subject: Performance penalty of visibility info in indexes?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group