Thread: Auto Vacuum Daemon

Auto Vacuum Daemon

From
Date:

Hello All,

 

I am using Postgres 8.3.5 on windows and was using manually VACCUM and ANALYZE commands in my scripts but now I have turned on the AutoVaccum daemon by changing the postgresql conf file.

 

Is it fine to do that or should we manually perform vacuum and analyze.

Will it automatically take care of vacuuming the tables and analyzing them?

 

Any suggestions will be appreciated.

 

Thanks & Regards

__________________________________________________________________________________________________________________________________

Ambarish Bhattacharya | Senior Software Engineer | SunGard Technology Services | Meridian Plaza, Sr.No.108/8/1+2/1, S B Road | Pune 411053, India |

| Tel: +91-20-25606232    | Mobile: +91 9823964376  | A.Bhattacharya@sungard.com  | www.sungard.com |

 

P Think before you print

CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited. If you received this email in error, please notify the sender and delete this email from your system. Thank you.

 

 

 

Re: Auto Vacuum Daemon

From
Rikard Bosnjakovic
Date:
On Wed, Dec 2, 2009 at 13:46,  <A.Bhattacharya@sungard.com> wrote:

> Is it fine to do that or should we manually perform vacuum and analyze.
>
> Will it automatically take care of vacuuming the tables and analyzing them?

Have a look at this wiki-page that was posted by Craig on this list a
few days ago:

http://wiki.postgresql.org/index.php?title=VACUUM_FULL


--
- Rikard - http://bos.hack.org/cv/

Re: Auto Vacuum Daemon

From
Scott Marlowe
Date:
On Wed, Dec 2, 2009 at 5:46 AM,  <A.Bhattacharya@sungard.com> wrote:
> Hello All,
>
> I am using Postgres 8.3.5 on windows and was using manually VACCUM and
> ANALYZE commands in my scripts but now I have turned on the AutoVaccum
> daemon by changing the postgresql conf file.
>
> Is it fine to do that or should we manually perform vacuum and analyze.
>
> Will it automatically take care of vacuuming the tables and analyzing them?
>
> Any suggestions will be appreciated.

Most of the time autovacuum is fine and can handle all your vacuuming
and analyzing needs no problem.

However, on some very heavy traffic or large sized databases you may
need to tune it so that it keeps up with your needs.

On my production database servers I had to adjust a few settings to
make autovac more aggressive so that it wasn't falling behind.  On all
my other pg instances the default settings are just fine.

Re: Auto Vacuum Daemon

From
Craig Ringer
Date:
On 3/12/2009 7:24 AM, Rikard Bosnjakovic wrote:
> On Wed, Dec 2, 2009 at 13:46,<A.Bhattacharya@sungard.com>  wrote:
>
>> Is it fine to do that or should we manually perform vacuum and analyze.
>>
>> Will it automatically take care of vacuuming the tables and analyzing them?
>
> Have a look at this wiki-page that was posted by Craig on this list a
> few days ago:
>
> http://wiki.postgresql.org/index.php?title=VACUUM_FULL

For that question you're better off reading:

http://www.postgresql.org/docs/current/static/routine-vacuuming.html#AUTOVACUUM

http://www.postgresql.org/docs/8.3/interactive/runtime-config-autovacuum.html


The main thing to understand is that turning on autovacuum may not be
quite sufficient if you have some tables with really high update or
delete loads. You may need to tell autovacuum to pay more attention to
those tables. Similarly, on heavily loaded databases you might need to
tune autovacuum to be more aggressive so that it keeps up with table bloat.

Since you're still on 8.3 you will also need to make sure that your
max_fsm_pages are sufficient. 8.4 gets rid of that configuration option
and manages the task for you automatically instead, so consider
upgrading at some point.

--
Craig Ringer