Re: How to debug a locked backend ?

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to debug a locked backend ?
Date: 2005-11-18 18:10:31
Message-ID: 20051118181031.GC29354@phlogiston.dyndns.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:
>
> Now according to pg_locks, the transaction of the update was holding an
> exclusive lock on the table, which I can't explain, as we don't acquire
> any table lock in our whole application, and the SQL of the update is

On the table, or was it a ROW EXCLUSIVE lock? That will be
automatically taken by an UPDATE.

> And then, why was I not able to cancel the backend via kill or
> pg_cancel_backend ?

That's a good question. The return code from kill -2 <pid> (or
whatever SIGINT is on your system) might be useful here. Also,
attaching to the pid with gdb might help.

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
The plural of anecdote is not data.
--Roger Brinner

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2005-11-18 19:16:17 Re: [ANNOUNCE] Sun supporting PostgreSQL
Previous Message Csaba Nagy 2005-11-18 18:08:25 Re: How to debug a locked backend ?