From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Lists <lists(at)benjamindsmith(dot)com>, pgsql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Unexpectedly high disk space usage RESOLVED (Manual reindex/vacuum) |
Date: | 2012-11-10 22:23:45 |
Message-ID: | CAOR=d=3-4AXQi9k7fr_pvYUM-BaUuN=Un7vLkrQEY5RosoqD+w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Nov 10, 2012 at 3:20 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
> On 11/10/2012 02:08 PM, Scott Marlowe wrote:
>>
>> On Sat, Nov 10, 2012 at 2:12 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>>>
>>> On Fri, Nov 9, 2012 at 5:56 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
>>> wrote:
>>>>
>>>>
>>>> As well, since the default nap time is 1 minute, it will take at least
>>>> 50 minutes to vacuum each db as nap time is how long autovac waits
>>>> between databases.
>>>
>>>
>>> That isn't how it works. The naptime is per database, not per
>>> cluster. If the naptime is 1 minute and there are 50 "active"
>>> databases, then it will launch a new worker every 1.2 seconds
>>> (assuming the old ones finish fast enough that doing so would not
>>> exceed autovacuum_max_workers)
>>
>>
>> Hmmm. That was not my understanding from previous discussions on nap
>> time.
>>
>>
>
>
> When in doubt there are the docs:)
>
> http://www.postgresql.org/docs/9.1/interactive/routine-vacuuming.html#AUTOVACUUM
>
> "The "autovacuum daemon" actually consists of multiple processes. There is a
> persistent daemon process, called the autovacuum launcher, which is in
> charge of starting autovacuum worker processes for all databases. The
> launcher will distribute the work across time, attempting to start one
> worker within each database every autovacuum_naptime seconds. (Therefore, if
> the installation has N databases, a new worker will be launched every
> autovacuum_naptime/N seconds.)"
And apparently it wasn't always this way:
http://www.postgresql.org/docs/8.2/interactive/routine-vacuuming.html#AUTOVACUUM
The autovacuum daemon, when enabled, runs every autovacuum_naptime
seconds. On each run, it selects one database to process and checks
each table within that database. VACUUM or ANALYZE commands are issued
as needed.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2012-11-10 22:49:10 | Re: Unexpectedly high disk space usage RESOLVED (Manual reindex/vacuum) |
Previous Message | Jeff Janes | 2012-11-10 22:21:47 | Re: Unexpectedly high disk space usage RESOLVED (Manual reindex/vacuum) |