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

Re: VACUUM ANALYZE blocking both reads and writes to atable

From: Peter Schuller <peter(dot)schuller(at)infidyne(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: VACUUM ANALYZE blocking both reads and writes to atable
Date: 2008-06-30 15:34:35
Message-ID: 20080630153435.GA15756@hyperion.scode.org (view raw or flat)
Thread:
Lists: pgsql-performance
Hello,

> No.  VACUUM takes an exclusive lock at the end of the operation to
> truncate empty pages.  (If it cannot get the lock then it'll just skip
> this step.)  In 8.2.4 there was a bug that caused it to sleep
> according to vacuum_delay during the scan to identify possibly empty
> pages.  This was fixed in 8.2.5:

[snip revision log]

Thank you very much! This does indeed seem to be the likely
culprit. Will try to either upgrade, or if not possible in time for
the next occurance, confirm that this is what is happening based on
pg_locks.

Thanks again for the very informative response.

-- 
/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter(dot)schuller(at)infidyne(dot)com>'
Key retrieval: Send an E-Mail to getpgpkey(at)scode(dot)org
E-Mail: peter(dot)schuller(at)infidyne(dot)com Web: http://www.scode.org

In response to

pgsql-performance by date

Next:From: Peter SchullerDate: 2008-06-30 15:43:18
Subject: Re: VACUUM ANALYZE blocking both reads and writes to atable
Previous:From: Tom LaneDate: 2008-06-30 15:25:55
Subject: Re: sequence scan problem

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