Re: How to debug a locked backend ?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Richard Huxton <dev(at)archonet(dot)com>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to debug a locked backend ?
Date: 2005-11-18 19:37:05
Message-ID: 20051118193658.GC17749@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2005-11-18 19:57:48 Re: [ANNOUNCE] Sun supporting PostgreSQL
Previous Message Josh Berkus 2005-11-18 19:16:17 Re: [ANNOUNCE] Sun supporting PostgreSQL