Re: AutoVacuum on demand?

From: Casey Duncan <casey(at)pandora(dot)com>
To: Glen Parker <glenebob(at)nwlink(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: AutoVacuum on demand?
Date: 2006-11-13 22:49:13
Message-ID: BDA6BC5C-26BA-4072-BBC3-7AD5650CE59C@pandora.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Nov 13, 2006, at 1:05 PM, Glen Parker wrote:

> Matthew T. O'Connor wrote:
>> Glen Parker wrote:
>>> I would like a way to run the autovacuum daemon on demand
>>> periodically. Every night at 2 AM, for example.
>>>
>>> Anybody know if this is possible? If not, it's a feature
>>> request :-)
>> Autovacuum can be enabled / disabled on the fly using the GUC
>> settings. Perhaps you can write a cron script that runs at 2AM
>> that enables autovac, and at 6AM (just a guess) disables it in the
>> same fashion. I think that should work.
>> Would be curious to hear your results.
>
> I thought it sounded like a good idea, but then...
>
> SET autovacuum = on;
> ERROR: parameter "autovacuum" cannot be changed now

I've turned it on and off in the postgresql.conf several times
(followed by a postmaster HUP) and it worked as expected. I think
this is a global setting that cannot be toggled in a particular session.

-Casey

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Verite 2006-11-13 23:01:44 Re: encoding advice requested
Previous Message Alvaro Herrera 2006-11-13 22:40:02 Re: AutoVacuum on demand?