On 06/03/2013 11:12 AM, Andres Freund wrote:
> On 2013-06-03 11:00:38 -0700, Josh Berkus wrote:
>>
>>>> Also, locking while it does its work.
>>>
>>> Eh?
>>
>> Even if we're doing lazy vacuum, we have to lock a few pages at a time
>> of each table. This does result in response time delays on the current
>> workload, which can be quite bad if it's a highly contended table already.
>
> We don't really lock more pages at a time than normal DML does. 1 heap
> page at a time, possibly several index pages at once.
Really? I though vacuum held onto its locks until it reached
vacuum_cost. If it doesn't, then maybe we should adjust the default for
vacuum_cost_limit upwards.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com