pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_autovacuum misinterpreting reltuples?
2+ messages / 2 participants
[nested] [flat]

* pg_autovacuum misinterpreting reltuples?
@ 2004-04-30 13:45  Jeff Boes <jboes@nexcerpt.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Jeff Boes @ 2004-04-30 13:45 UTC (permalink / raw)
  To: pgsql-hackers

We noticed that one of our high-volume insert tables was being vacuumed 
every time pg_autovacuum woke up. (I"m running it with the default 
threshold values, and a 900-second sleep cycle.) The table has a few 
million rows in it. With "debug = 2" on, here's what the pg_autovacuum 
log reports for this table:

 [2004-04-30 09:32:11 AM]   table name:     nexcerpt."public"."links"
 [2004-04-30 09:32:11 AM]      relid: 1014188;   relisshared: 0
 [2004-04-30 09:32:11 AM]      reltuples: 3;  relpages: 118888

Note that "reltuples" is being reported as "3", which seems a bit low. Aha!

# select reltuples from pg_class where relname = 'links';
  reltuples
-------------
 3.32127e+06
(1 row)

Is it possible that pg_autovacuum sees this value as "3"? Or is it just 
mis-formatting the value in the log?

-- 
Jeff Boes                                      vox 269.226.9550 ext 24
Database Engineer                                     fax 269.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
           ...Nexcerpt... Extend your Expertise




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pg_autovacuum misinterpreting reltuples?
@ 2004-05-05 18:25  Matthew T. O'Connor <matthew@zeut.net>
  parent: Jeff Boes <jboes@nexcerpt.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Matthew T. O'Connor @ 2004-05-05 18:25 UTC (permalink / raw)
  To: Jeff Boes <jboes@nexcerpt.com>; +Cc: pgsql-hackers

Jeff Boes wrote:
> We noticed that one of our high-volume insert tables was being vacuumed 
> every time pg_autovacuum woke up. (I"m running it with the default 
> threshold values, and a 900-second sleep cycle.) The table has a few 
> million rows in it. With "debug = 2" on, here's what the pg_autovacuum 
> log reports for this table:
> 
> [2004-04-30 09:32:11 AM]   table name:     nexcerpt."public"."links"
> [2004-04-30 09:32:11 AM]      relid: 1014188;   relisshared: 0
> [2004-04-30 09:32:11 AM]      reltuples: 3;  relpages: 118888
> 
> Note that "reltuples" is being reported as "3", which seems a bit low. Aha!
> 
> # select reltuples from pg_class where relname = 'links';
>  reltuples
> -------------
> 3.32127e+06
> (1 row)
> 
> Is it possible that pg_autovacuum sees this value as "3"? Or is it just 
> mis-formatting the value in the log?

Yes.  This is a known bug inside of pg_autovacuum, it is fixed inside of 
CVS, and will be released with 7.4.3 (whenever that happens, hopefully 
soon since I'm getting lots of reports for this bug).  Please downlooad 
pg_autovacuum from CVS and compile by hand for the time being.

Matthew O'Connor



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-05-05 18:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-04-30 13:45 pg_autovacuum misinterpreting reltuples? Jeff Boes <jboes@nexcerpt.com>
2004-05-05 18:25 ` Matthew T. O'Connor <matthew@zeut.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox