Re: pg_autovacuum / pg_class

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_autovacuum / pg_class
Date: 2006-10-26 12:52:37
Message-ID: 20061026125237.GL9340@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tomas Vondra wrote:
> Hello,
>
> I have a simple question about auto-vacuuming. We are running a Postgres
> 8.1 and I've noticed that some of the tables are not analyzed by the
> pg_autovacuum daemon. That is - when I select the rows from pg_class,
> all the important values (relpages, reltuples) are 0.
>
> I've noticed this in case of newly created tables (that is not older
> than 1 month). My 'theory' is this - the table has to be analyzed by
> hand at the beginning, otherwise the pg_autovacuum won't process it. Am
> I right?

Hum. Just by inserting tuples into those tables, autovacuum should "be
able to see" them. Autovacuum won't touch, and indeed won't even
consider, tables that are just created. But as soon as you insert a
single tuple in them, it will start to consider vacuuming or analyzing
them.

If you insert a hundred thousand rows in a table, autovacuum most
certainly should analyze it. If it's not, we'd really like to know why.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GUNDUZ 2006-10-26 13:32:06 Re: Problem with 8.1.5 RPMs for Redhat AS 4
Previous Message richard.day 2006-10-26 11:46:46 UK Hosting Providers