Skip site navigation (1) Skip section navigation (2)

Re: Normal VACUUM locks indexes?

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Aldor <an(at)mediaroot(dot)de>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Normal VACUUM locks indexes?
Date: 2005-08-19 14:59:10
Message-ID: 20050819145910.GE12685@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-admin
On Thu, Aug 18, 2005 at 02:08:14PM +0100, Aldor wrote:

> When running VACUUM it was vacuuming first the indexes, after that it 
> was vacuuming the table data. While it was vacuuming the indexes I tried 
> to make some queries into the table - I didn't get any lock error but 
> saw that that the process which was responsible for my query was set to 
> the state WAIT. After that I made a second query, again... WAIT. After 
> VACUUM finished the indexes and started processing the table data the 
> WAIT processes were processed and the query result appeared. Any new 
> query was also not set to WAIT, it was processed immediately.

Set to state WAIT where?  If you saw that in "top" or "ps" output, then
it wasn't set by Postgres itself -- the operating system did that, and
what it was waiting for was disk I/O.

If this is the case, you should consider setting the cost-based vacuum
nap options appropiately, so that the vacuum process does not impact on
I/O too much while running.  Read the section of the fine manual about
"Cost-based vacuum delay"; I think it's in the "runtime configuration"
section.

-- 
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"Before you were born your parents weren't as boring as they are now. They
got that way paying your bills, cleaning up your room and listening to you
tell them how idealistic you are."  -- Charles J. Sykes' advice to teenagers

In response to

pgsql-admin by date

Next:From: Tom LaneDate: 2005-08-19 17:14:48
Subject: Re: backup users and groups informations
Previous:From: Bouchard SylvieDate: 2005-08-19 14:49:09
Subject: backup users and groups informations

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group