Re: Anyone seen this kind of lock pileup? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Anyone seen this kind of lock pileup?
Date
Msg-id 24934.1290031132@sss.pgh.pa.us
Whole thread Raw
In response to Anyone seen this kind of lock pileup?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Anyone seen this kind of lock pileup?  (Josh Berkus <josh@agliodbs.com>)
Re: Anyone seen this kind of lock pileup?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
Josh Berkus <josh@agliodbs.com> writes:
> Having an interesting issue on one 8.4 database.  Due to poor
> application design, the application is requesting 8-15 exclusive
> (update) locks on the same row on parallel connections pretty much
> simultaneously (i.e. < 50ms apart).

> 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.

Hmm ... can you extract a test case?  Or at least strace the backends
involved?

            regards, tom lane

pgsql-performance by date:

Previous
From: Rich
Date:
Subject: Re: Query Performance SQL Server vs. Postgresql
Next
From: Josh Berkus
Date:
Subject: Re: Anyone seen this kind of lock pileup?