Re: Vacuum, Freeze and Analyze: the big picture - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Vacuum, Freeze and Analyze: the big picture
Date
Msg-id 20130603181200.GA12323@alap2.anarazel.de
Whole thread Raw
In response to Re: Vacuum, Freeze and Analyze: the big picture  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
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.

There's something related which can cause problems which is that we
require cleanup locks on the page to be able to repair fragmentation
which makes *vacuum* wait for all clients to release their page pins.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Vacuum, Freeze and Analyze: the big picture
Next
From: Tom Lane
Date:
Subject: Re: UTF-8 encoding problem w/ libpq