Re: VACUUM ANALYZE blocking both reads and writes to a table

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 a table
Date: 2008-06-30 15:34:35
Message-ID: 20080630153435.GA15756@hyperion.scode.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-performance by date

  From Date Subject
Next Message Peter Schuller 2008-06-30 15:43:18 Re: VACUUM ANALYZE blocking both reads and writes to a table
Previous Message Tom Lane 2008-06-30 15:25:55 Re: sequence scan problem