Re: Estimation error in n_dead_tuples

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Estimation error in n_dead_tuples
Дата
Msg-id 017466B3-56C8-4B9F-97BC-48934B8C6361@decibel.org
обсуждение исходный текст
Ответ на Re: Estimation error in n_dead_tuples  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Feb 1, 2007, at 10:57 AM, Tom Lane wrote:
> 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.

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@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Logging Lock Waits
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: PL/pgSQL RENAME functionality in TODOs