From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Collin Peters <cadiolis(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pgAdmin complains about vacuuming required after fresh 8.1 install |
Date: | 2008-06-12 08:30:08 |
Message-ID: | 4850DE90.3090802@lelarge.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2008-06-12 08:33:36 | Re: pgAdmin complains about vacuuming required after fresh 8.1 install |
Previous Message | A. Kretschmer | 2008-06-12 08:25:05 | Re: pl/pgsql function with argument of type DATE |