WHY transaction waits for another transaction?

From: Vilinski Vladimir <vilinski(at)web(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: WHY transaction waits for another transaction?
Date: 2005-06-14 11:12:13
Message-ID: 141218891@web.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hallo

I'm porting one Oracle Application to Postgres. This Programm uses "long
living" Transactions.

During the execution of transaction Nr:10295 (PID:18430) one new transaction with
Nr:10339 (PID:18431) starts, that writes one record into the table. But this new
transaction never stops, because it tries to set one ShareLock to its
parrent transaction Nr:10295.

My problem is, how can i found out - WHY the second transaction waits
for end of first transaction?
Is there a tool for analyzing such deadlocks?

pg_lock output
relation database transacti pid mode granted
251553 251331 18430 AccessShareLock t
251553 251331 18430 RowExclusiveLock t
251487 251331 18430 AccessShareLock t
251487 251331 18430 RowShareLock t
251487 251331 18430 RowExclusiveLock t
251492 251331 18430 AccessShareLock t
251494 251331 18431 AccessShareLock t
251434 251331 18434 AccessShareLock t
251407 251331 18431 AccessShareLock t
251434 251331 18430 AccessShareLock t
251429 251331 18430 AccessShareLock t
251548 251331 18430 AccessShareLock t
251548 251331 18430 RowExclusiveLock t
251575 251331 18430 AccessShareLock t
251458 251331 18430 AccessShareLock t
251524 251331 18434 AccessShareLock t
10293 18434 ExclusiveLock t
251482 251331 18430 AccessShareLock t
251482 251331 18430 RowShareLock t
251492 251331 18431 AccessShareLock t
251577 251331 18431 AccessShareLock t
251477 251331 18431 AccessShareLock t
251567 251331 18431 AccessShareLock t
251417 251331 18431 AccessShareLock t
251492 251331 18434 AccessShareLock t
1247 251331 18431 AccessShareLock t
16839 251331 18438 AccessShareLock t
251494 251331 18430 AccessShareLock t
251494 251331 18430 RowShareLock t
251494 251331 18430 RowExclusiveLock t
251434 251331 18431 AccessShareLock t
251553 251331 18431 AccessShareLock t
251494 251331 18434 AccessShareLock t
251392 251331 18431 AccessShareLock t
251472 251331 18430 AccessShareLock t
251472 251331 18430 RowShareLock t
251526 251331 18431 AccessShareLock t
251577 251331 18430 AccessShareLock t
251482 251331 18431 AccessShareLock t
251482 251331 18431 RowShareLock t
251472 251331 18431 AccessShareLock t
251472 251331 18431 RowShareLock t
251472 251331 18431 RowExclusiveLock t
251487 251331 18434 AccessShareLock t
251553 251331 18434 AccessShareLock t
251407 251331 18430 AccessShareLock t
251407 251331 18430 RowShareLock t
10381 18438 ExclusiveLock t
251487 251331 18431 AccessShareLock t
251487 251331 18431 RowShareLock t
251487 251331 18431 RowExclusiveLock t
251509 251331 18430 AccessShareLock t
251386 251331 18431 AccessShareLock t
251394 251331 18430 AccessShareLock t
10339 18431 ExclusiveLock t
251407 251331 18434 AccessShareLock t
10295 18430 ExclusiveLock t
251422 251331 18430 AccessShareLock t
10295 18431 ShareLock f

_________________________________________________________________________
Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message M.D.G. Lange 2005-06-14 11:34:25 foreign key on pg_shadow
Previous Message Markus Bertheau 2005-06-14 05:46:49 Re: getting details about integrity constraint violation