Re: Stat estiamtes off - why?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nicholson, Brad (Toronto, ON, CA)" <bnicholson(at)hp(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Stat estiamtes off - why?
Date: 2013-08-29 17:14:59
Message-ID: 9309.1377796499@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Nicholson, Brad (Toronto, ON, CA)" <bnicholson(at)hp(dot)com> writes:
> I'm seeing something odd in my DB stats. This is PG 9.2.4 on CentOS. I know the stats collector can be off at times, but I am curious as to why it would be off in such a case. I know that under heavy load the stats collector can be off sometimes, but this system was barely doing anything (CPU ~ 90% idle). PG didn't shutdown at all either.

Most likely there was some DML happening concurrently with a VACUUM or
ANALYZE at some point in the past. VACUUM/ANALYZE update the live and
dead tuple counts based on what they saw, but a transaction that added
such tuples (that were counted by the maintenance op) could commit after
that happens, and then you end up with double-counted tuples.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2013-08-29 19:11:07 question about age()
Previous Message Nicholson, Brad (Toronto, ON, CA) 2013-08-29 16:24:10 Stat estiamtes off - why?