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

From Andrew Sullivan
Subject Re: How to debug a locked backend ?
Date
Msg-id 20051118181031.GC29354@phlogiston.dyndns.org
Whole thread Raw
In response to 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:
>
> 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@crankycanuck.ca
The plural of anecdote is not data.
        --Roger Brinner

pgsql-general by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: Why CALL/PERFORM not part of core SQL?
Next
From: Csaba Nagy
Date:
Subject: Re: How to debug a locked backend ?