Re: Blocking excessively in FOR UPDATE - Mailing list pgsql-performance

From Robert Haas
Subject Re: Blocking excessively in FOR UPDATE
Date
Msg-id CA+TgmoZ3n5a5kKvO6cFwUEa5eBQWK=s8nvy_-86eP82nFv8Eig@mail.gmail.com
Whole thread Raw
In response to Re: Blocking excessively in FOR UPDATE  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-performance
On Fri, Nov 4, 2011 at 12:07 PM, Claudio Freire <klaussfreire@gmail.com> wrote:
> What are those writes about? HOT vacuuming perhaps?

Every tuple lock requires dirtying the page.  Those writes are all
those dirty pages getting flushed out to disk.  It's possible that the
OS is allowing the writes to happen asynchronously for a while, but
then when you get too much dirty data in the cache, it starts
blocking.

The only thing I'm fuzzy about is why it's locking so many rows, given
that the output says rows=1.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-performance by date:

Previous
From: Claudio Freire
Date:
Subject: Re: Blocking excessively in FOR UPDATE
Next
From: "Sorbara, Giorgio (CIOK)"
Date:
Subject: Re: Strange query plan