Re: auto-vacuum & Negative "anl" Values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Dylan Hansen <dhansen(at)pixpo(dot)com>, "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: auto-vacuum & Negative "anl" Values
Date: 2006-06-27 04:05:02
Message-ID: 8904.1151381102@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> + /* last_anl_tuples must never exceed n_live_tuples */

If we actually believe the above statement, it seems like your patch
to pgstat_recv_tabstat() opens a new issue: with that patch, it is
possible for pgstat_recv_tabstat() to decrease n_live_tuples, and
therefore a clamp needs to be applied in pgstat_recv_tabstat() too.
No?

The reason I didn't patch it myself is that I'm not quite clear on what
*should* be happening here. What effect should a large delete have on
the ANALYZE threshold, exactly? You could argue that a deletion
potentially changes the statistics (by omission), and therefore inserts,
updates, and deletes should equally count +1 towards the analyze
threshold. I don't think we are implementing that though. If we want
to do it that way, I suspect last_anl_tuples as currently defined is not
the right comparison point.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2006-06-27 04:47:22 Preformace boost -- by 8.0.4 upgrade to 8.1.4
Previous Message Bruno Almeida do Lago 2006-06-27 03:52:48 FKs Lock Contention