Re: [HACKERS] Estimation error in n_dead_tuples

2007-02-02 Thread Jim Nasby
On Feb 1, 2007, at 10:57 AM, Tom Lane wrote: ITAGAKI Takahiro [EMAIL PROTECTED] 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

[HACKERS] Estimation error in n_dead_tuples

2007-02-01 Thread ITAGAKI Takahiro
AFAICS, the statistics information the number of dead tuples (n_dead_tuples) has an estimation error. VACUUM sends a message to stats collector process when it has swept a table. The stats collector receives the message and sets n_dead_tuples of the table to zero. However, we can update or delete

Re: [HACKERS] Estimation error in n_dead_tuples

2007-02-01 Thread Tom Lane
ITAGAKI Takahiro [EMAIL PROTECTED] 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.

Re: [HACKERS] Estimation error in n_dead_tuples

2007-02-01 Thread ITAGAKI Takahiro
Tom Lane [EMAIL PROTECTED] wrote: 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 seems awfully dangerous to me, because then you are operating on dead