From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Anyone seen this kind of lock pileup?
Date: Wed, 17 Nov 2010 15:42:14 -0800
Message-ID: <4CE46856.7070006@agliodbs.com> (raw)
In-Reply-To: <24934.1290031132@sss.pgh.pa.us>
References: <4CE412F4.4090101@agliodbs.com>
<24934.1290031132@sss.pgh.pa.us>
>> What's odd about this is that the resulting "lock pileup" takes a
>> mysterious 2-3.5 seconds to clear, despite the fact that none of the
>> connections are *doing* anything during that time, nor are there
>> deadlock errors. In theory at least, the locks should clear out in
>> reverse order in less than a second; none of the individual statements
>> takes more than 10ms to execute.
Ok, I've collected more data. Looks like the case I was examining was
idiosyncratic; most of these lock pile-ups involve 400 or more locks
waiting held by around 20 different backends. Given this, taking 3
seconds to sort that all out doesn't seem that unreasonable.
Presumably there's a poll cycle of some sort for waiting statements?
Anyway, the obvious answer is for the user to fix their application.
--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, tgl@sss.pgh.pa.us
Subject: Re: Anyone seen this kind of lock pileup?
In-Reply-To: <4CE46856.7070006@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox