Error in backend/storage/lmgr/proc.c: ProcSleep()
От | Tomasz Zielonka |
---|---|
Тема | Error in backend/storage/lmgr/proc.c: ProcSleep() |
Дата | |
Msg-id | 20010903065557.A6474@mult.i.pl обсуждение исходный текст |
Ответы |
Re: Error in backend/storage/lmgr/proc.c: ProcSleep()
Re: Error in backend/storage/lmgr/proc.c: ProcSleep() |
Список | pgsql-bugs |
Hi! Platform: PostgreSQL 7.1.3, Linux 2.4.8, egcs 2.91.66 PostgreSQL forgets to release lock until shutdown in this scenario: CREATE TABLE dummy (X integer); session1 session2 ------------------------------------------------------------ BEGIN; | |BEGIN; SELECT * FROM dummy; | |SELECT * FROM dummy; LOCK TABLE dummy; | |LOCK TABLE dummy; deadlock.... \q \q Deadlock is OK here, but I can't access dummy table until I restart postmaster Everything's fine, when I comment out * marked lines in backend/storage/lmgr/proc.c: if (myHeldLocks != 0) { int aheadRequests = 0; proc = (PROC *) MAKE_PTR(waitQueue->links.next); for (i = 0; i < waitQueue->size; i++) { /* Must he wait for me? */ if (lockctl->conflictTab[proc->waitLockMode] & myHeldLocks) { /* Must I wait for him ? */ * if (lockctl->conflictTab[lockmode] & proc->heldLocks) * { * /* Yes, can report deadlock failure immediately */ * MyProc->errType = STATUS_ERROR; * return STATUS_ERROR; * } Then the standard deadlock detection procedure is used. greetings, tom -- .signature: Too many levels of symbolic links
В списке pgsql-bugs по дате отправления: