|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.70 2000/02/24 04:36:01 inoue Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.71 2000/04/10 00:45:42 inoue Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
|
47 | 47 | *This is so that we can support more backends. (system-wide semaphore |
48 | 48 | *sets run out pretty fast.) -ay 4/95 |
49 | 49 | * |
50 | | - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.70 2000/02/24 04:36:01 inoue Exp $ |
| 50 | + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.71 2000/04/10 00:45:42 inoue Exp $ |
51 | 51 | */ |
52 | 52 | #include<sys/time.h> |
53 | 53 | #include<unistd.h> |
@@ -493,7 +493,12 @@ voidSetWaitingForLock(bool waiting) |
493 | 493 | lockWaiting=waiting; |
494 | 494 | if (lockWaiting) |
495 | 495 | { |
496 | | -Assert(MyProc->links.next!=INVALID_OFFSET); |
| 496 | +/* The lock was already released ? */ |
| 497 | +if (MyProc->links.next==INVALID_OFFSET) |
| 498 | +{ |
| 499 | +lockWaiting= false; |
| 500 | +return; |
| 501 | +} |
497 | 502 | if (QueryCancel)/* cancel request pending */ |
498 | 503 | { |
499 | 504 | if (GetOffWaitqueue(MyProc)) |
|