Re: When to Vacuum

From: Medi Montaseri <medi(dot)montaseri(at)intransa(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: When to Vacuum
Date: 2003-01-27 21:39:34
Message-ID: 3E35A716.6060602@intransa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Interesting...

So who/where is RelationGetNumberOfBlocks() defined, are these actual
source codes
that makeup the postgres/postmaster ?

Bruce Momjian wrote:

>Yes. The pg_stat tables do have info on the number of deleted rows,
>stuff like that. You can use that to determine the number of number of
>changes since you last vacuumed. There is also /contrib/pgstattuple
>that shows table info.
>
>---------------------------------------------------------------------------
>
>Medi Montaseri wrote:
>
>
>>I posted this on 1/20 but never got delivered....trying again....
>>
>>I was wondering if I can use any of the pg_stat* related tables to
>>determine if I
>>need to vacuum or not.
>>
>>More specifically, instead of assuming a period (based on one's usage),
>>if I was
>>to vacuum more adaptively, I could have a cron job to check certain
>>statistics table
>>every 10 minutes (or hour) and if a threashold is reached a vauum be
>>performed.
>>
>>If this is possible, please specifiy the condition for vacuum and vacuum
>>full please.
>>
>>Thanks
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>>
>>
>>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-01-27 21:56:58 Re: pg_dump: Attempt to lock table "contexthelp" failed.
Previous Message Tom Lane 2003-01-27 21:37:53 Re: Date problem