Michael Fuhr <mike(at)fuhr(dot)org> writes:
> Further investigation shows that what really seems to be happening
> in 8.3devel is that the statistics for shared tables are reset every
> 15 seconds when autovacuum is enabled, which it is by default. I
> don't observe this phenomenon when autovacuum is disabled.
OK, so it's just that pgstat_vacuum_tabstat() gets run by autovacuum.
So either form of Alvaro's patch should fix it.
regards, tom lane