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

Re: Anyone seen this kind of lock pileup?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Anyone seen this kind of lock pileup?
Date: 2010-11-17 21:58:52
Message-ID: 24934.1290031132@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Mladen GogalaDate: 2010-11-17 22:00:03
Subject: Re: Query Performance SQL Server vs. Postgresql
Previous:From: RichDate: 2010-11-17 21:51:55
Subject: Re: Query Performance SQL Server vs. Postgresql

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