How to handle waitingForLock in LockWaitCancel()

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема How to handle waitingForLock in LockWaitCancel()
Дата
Msg-id 3AA3026C.7623B17F@tpf.co.jp
обсуждение исходный текст
Ответы Re: How to handle waitingForLock in LockWaitCancel()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

I sometimes encountered SEGV errors in my test case
when I canceled the execution.
Probably it's due to the almost simultaneous arrival
of multiple signals and the following patch seems to
fix the bug. However I'm afraid that the change should
cause another bug.

Comments ?

Regards,
Hiroshi Inoue


Index: proc.c
===================================================================
RCS file:
/home/projects/pgsql/cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v
retrieving revision 1.98
diff -c -c -r1.98 proc.c
*** proc.c      2001/01/26 18:23:12     1.98
--- proc.c      2001/03/05 02:28:09
***************
*** 327,334 ****       if (!waitingForLock)               return false;

-       waitingForLock = false;
-       /* Turn off the deadlock timer, if it's still running (see
ProcSleep) */ #ifndef __BEOS__       {
--- 327,332 ----
***************
*** 345,350 ****
--- 343,349 ----
       /* Unlink myself from the wait queue, if on it (might not be
anymore!) *
/       LockLockTable();
+       waitingForLock = false;       if (MyProc->links.next != INVALID_OFFSET)
RemoveFromWaitQueue(MyProc);      UnlockLockTable();
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Patrick Dunford"
Дата:
Сообщение: Access 97 & PostgreSQL ODBC Driver Problems
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to handle waitingForLock in LockWaitCancel()