From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Deadlock detection |
Date: | 2003-05-19 01:02:52 |
Message-ID: | 20030519010252.GE3325@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hackers,
I've been briefly looking at the deadlock detection code to see what's
needed to support nested transactions.
It seems the only way to run the deadlock detection
(storage/lmgr/deadlock.c:DeadLockCheck()) is through
storage/lmgr/proc.c:CheckDeadLock(), and it's only called with MyProc as
argument. AFAIU this means that the only transaction that can be
aborted is the transaction that's trying to acquire the lock.
If this is so, then it's obvious that there can't be subtransactions in
progress of the transaction that's going to be aborted. This means that
there's no need for a mechanism to abort a transaction and all its
subtransactions, because they are all finished if there are any at all.
Am I right on this?
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El dia que dejes de cambiar dejaras de vivir"
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-05-19 01:50:38 | removal of protocol 1.0 question |
Previous Message | Dave Page | 2003-05-18 19:26:20 | Testing... |