Re: autovacuum blues

From: "Anton Melser" <melser(dot)anton(at)gmail(dot)com>
To: "Anton Melser" <melser(dot)anton(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: autovacuum blues
Date: 2006-11-09 21:44:25
Message-ID: 92d3a4950611091344l21762f4bmb5390baad8f41f3f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/11/06, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Anton Melser wrote:
>
> > Thanks for that. Just a clarification, can someone tell me what the
> > "number of tuples" means in the context of the multipliers? I mean,
> > when the vacuum min multiplier is at 0.4, we multiply 0.4 by what? I
> > get the min val, but what are we multiplying by 0.4? The total number
> > of tuples in the table? The total modified/deleted?
>
> pg_class.reltuples

And so...

For efficiency reasons, reltuples and relpages are not updated
on-the-fly, and so they usually contain somewhat out-of-date values.
They are updated by VACUUM, ANALYZE, and a few DDL commands such as
CREATE INDEX. A stand-alone ANALYZE, that is one not part of VACUUM,
generates an approximate reltuples value since it does not read every
row of the table. The planner will scale the values it finds in
pg_class to match the current physical table size, thus obtaining a
closer approximation.

So I am still a little unclear... I need to analyse to get relevant
stats for autovacuum... but autovacuum needs to be used to update the
relevant stats? Can I REALLY do without a cronjob, or am I just
thinking wishfully (I can invent expressions if I want!).
Cheers
Antoine

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brent Wood 2006-11-09 21:57:24 Re: Problem with pg_dump
Previous Message Martijn van Oosterhout 2006-11-09 21:24:11 Re: Can non-superuser install c functions ?