Re: How to debug a locked backend ? - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: How to debug a locked backend ?
Date
Msg-id 20051118193658.GC17749@svana.org
Whole thread Raw
In response to Re: How to debug a locked backend ?  (Csaba Nagy <nagy@ecircle-ag.com>)
Responses Re: How to debug a locked backend ?  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-general
On Fri, Nov 18, 2005 at 05:00:06PM +0100, Csaba Nagy wrote:
> This current situation is different, the machine was almost idle, and
> there was 1 UPDATE on a table running, a lot of inserts on the same
> table waiting for a lock held by the transaction of the UPDATE, and a
> VACUUM (started by autovacuum) running on the same table. There was no
> dead-lock detected by the system, and I guess it should have detected it
> if it was one, cause this whole thing was running for more than 3 hours
> according to pg_stat_activity, and I set the deadlock timeout to 2
> seconds.

So what is the UPDATE doing? What is the query (see pg_stat_activity)
doing? Is it updating a lot of rows? If the query does run for a long
time holding any kind of lock, you're going to get strange effects like
this.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Michelle Konzack
Date:
Subject: Re: 3 x PostgreSQL in cluster/redunant
Next
From: Michelle Konzack
Date:
Subject: Re: 3 x PostgreSQL in cluster/redunant