Skip site navigation (1) Skip section navigation (2)

Re: pg_autovacuum not having enough suction ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Cc: Otto Blomqvist <o(dot)blomqvist(at)secomintl(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: pg_autovacuum not having enough suction ?
Date: 2005-03-25 19:55:27
Message-ID: 11991.1111780527@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
"Matthew T. O'Connor" <matthew(at)zeut(dot)net> writes:
> hmm.... the value in reltuples should be accurate after a vacuum (or 
> vacuum analyze) if it's not it's a vacuum bug or something is going on 
> that isn't understood.  If you or pg_autovacuum are running plain 
> analyze commands, that could explain the invalid reltules numbers.

> Was reltuples = 113082 correct right after the vacuum? 

Another thing to check is whether the reltuples (and relpages!) that
autovacuum is reporting are the same as what's actually in the pg_class
row for the relation.  I'm wondering if this could be a similar issue
to the old autovac bug where it wasn't reading the value correctly.

If they are the same then it seems like it must be a backend issue.

One thing that is possibly relevant here is that in 8.0 a plain VACUUM
doesn't set reltuples to the exactly correct number, but to an
interpolated value that reflects our estimate of the "steady state"
average between vacuums.  I wonder if that code is wrong, or if it's
operating as designed but is confusing autovac.

Can autovac be told to run the vacuums in VERBOSE mode?  It would be
useful to compare what VERBOSE has to say to the changes in
reltuples/relpages.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2005-03-25 20:22:49
Subject: lazy_update_relstats considered harmful (was Re: [PERFORM] pg_autovacuum not having enough suction ?)
Previous:From: Matthew T. O'ConnorDate: 2005-03-25 19:45:42
Subject: Re: pg_autovacuum not having enough suction ?

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-03-25 20:22:49
Subject: lazy_update_relstats considered harmful (was Re: [PERFORM] pg_autovacuum not having enough suction ?)
Previous:From: Lyubomir PetrovDate: 2005-03-25 19:54:40
Subject: Bug 1500

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group