Re: pg_class reltuples/relpages not updated by autovacuum/vacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Florian Helmberger <fh(at)25th-floor(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_class reltuples/relpages not updated by autovacuum/vacuum
Date: 2011-05-25 15:49:57
Message-ID: 19785.1306338597@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Florian Helmberger <fh(at)25th-floor(dot)com> writes:
> I think I've pinned the problem down to the values pg_class holds for
> the affected TOAST table:
> relpages | 433596
> reltuples | 1868538
> These values are significantly too low. Interestingly, the autovacuum
> logout reports the correct values:
> pages: 0 removed, 34788136 remain
> tuples: 932487 removed, 69599038 remain
> but these aren't stored in pg_class after each run.

I've moved discussion of this to pgsql-hackers, since this appears to be
an actual bug.

> Side note: while trying to debug this I've noticed, that the TOAST
> chunks on 32-bit systems have the documented size of 2000 bytes, on
> 64-bit systems they have 1996 bytes. Is this normal/on purpose?

I don't have the exact numbers in my head, but the TOAST chunk size does
depend on a MAXALIGN calculation, so it being different between 32- and
64-bit isn't surprising.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2011-05-25 16:00:38 Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Previous Message Tom Lane 2011-05-25 15:47:52 Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-05-25 15:51:51 Re: Volunteering as Commitfest Manager
Previous Message Tom Lane 2011-05-25 15:47:52 Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum