Re: how to release a transaction lock on a table?

From: Si Chen <schen(at)graciousstyle(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: how to release a transaction lock on a table?
Date: 2005-02-01 18:53:11
Message-ID: 41FFD017.9040109@graciousstyle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael,

I would like to track down what in the application is causing the
deadlock, but it's a bit hard since it's a big app with lots going on.
I can track down the PID of the transaction which is locking the tables,
but is there anyway to go from the PID back to the SQL statement(s) in
the transaction?

Thanks,

Si

Michael Fuhr wrote:

>On Mon, Jan 31, 2005 at 11:43:45AM -0800, Si Chen wrote:
>
>
>
>>Thanks, Michael, for the input. Is there anyway in PostgreSQL to force
>>some transactions to close (rollback if necessary)? I notice there is no
>>way to release a LOCK manually.
>>
>>
>
>I'm not aware of a way to terminate a transaction in another session
>short of killing its backend process. PostgreSQL 8.0 has a
>pg_cancel_backend() function, but it cancels only a backend's current
>query, not any outer transaction it might be part of.
>
>Have you discovered what's holding the conflicting lock? It would
>be prudent to understand what's happening before killing one
>transaction just so another can succeed.
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message TJ O'Donnell 2005-02-01 18:56:45 Does indexing help >= as well as = for integer columns?
Previous Message Alvaro Herrera 2005-02-01 17:33:16 Re: Import SVG file