Re: pgAdmin complains about vacuuming required after fresh 8.1 install - Mailing list pgsql-general

From Guillaume Lelarge
Subject Re: pgAdmin complains about vacuuming required after fresh 8.1 install
Date
Msg-id 4850DE90.3090802@lelarge.info
Whole thread Raw
In response to Re: pgAdmin complains about vacuuming required after fresh 8.1 install  ("Collin Peters" <cadiolis@gmail.com>)
Responses Re: pgAdmin complains about vacuuming required after fresh 8.1 install  ("Dave Page" <dpage@pgadmin.org>)
List pgsql-general
Collin Peters a écrit :
> Does anyone have *any* thoughts on this?  This seems to be a fairly
> common problem.  Does anybody have any good links that they can
> provide to find an answer?
>
> My current test is that I have a table where all the rows were purged,
> and then new ones inserted using a specific job.  pgAdmin reports 0
> estimated rows and 46 counted rows and therefore displays the popup
> saying a vacuum should be run.  I see in the PostgreSQL log that
> autovacuum is vacuuming this database regularly.
>

I don't think so. Your previous message says you see messages like
"processing database X", which doesn't mean the database is vacuumed. It
just says that the autovacuum process connects to this database and
tries to find if a table needs vacuum (according to the parameters). How
many rows did you purge in your database ? if it's less than
autovacuum_vacuum_threshold, then you're sure your table has not been
vacuumed.

> Is this simply because pgAdmin has tighter settings and autovacuum
> hasn't actually done anything with this table yet?
>

They don't use the same algorithms.

pgAdmin's algorithm is this one : it shows the hint if estimated rows
(reltuples in pg_class) is equal to 1000 or, if he knows the exact
number of rows, if the exact number of rows is different from the
estimated rows but greater than 20 or another complex calculation.

autovacuum's algorithm use some parameters and some PostgreSQL statistics.

Read
http://www.postgresql.org/docs/8.3/interactive/runtime-config-autovacuum.html
and
http://www.postgresql.org/docs/8.3/interactive/routine-vacuuming.html#AUTOVACUUM
for more details.

Regards.


--
Guillaume.
  http://www.postgresqlfr.org
  http://dalibo.com

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: pl/pgsql function with argument of type DATE
Next
From: "Dave Page"
Date:
Subject: Re: pgAdmin complains about vacuuming required after fresh 8.1 install