File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 15
15
* Portions Copyright (c) 1994, Regents of the University of California
16
16
*
17
17
* IDENTIFICATION
18
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.25 2004/12/31 22:01:05 pgsql Exp $
18
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.26 2005/04/08 03:43:54 tgl Exp $
19
19
*
20
20
*-------------------------------------------------------------------------
21
21
*/
@@ -328,7 +328,8 @@ LWLockAcquire(LWLockId lockid, LWLockMode mode)
328
328
SpinLockRelease_NoHoldoff (& lock -> mutex );
329
329
330
330
/* Add lock to list of locks held by this backend */
331
- Assert (num_held_lwlocks < MAX_SIMUL_LWLOCKS );
331
+ if (num_held_lwlocks >= MAX_SIMUL_LWLOCKS )
332
+ elog (ERROR , "too many LWLocks taken" );
332
333
held_lwlocks [num_held_lwlocks ++ ] = lockid ;
333
334
334
335
/*
@@ -397,7 +398,8 @@ LWLockConditionalAcquire(LWLockId lockid, LWLockMode mode)
397
398
else
398
399
{
399
400
/* Add lock to list of locks held by this backend */
400
- Assert (num_held_lwlocks < MAX_SIMUL_LWLOCKS );
401
+ if (num_held_lwlocks >= MAX_SIMUL_LWLOCKS )
402
+ elog (ERROR , "too many LWLocks taken" );
401
403
held_lwlocks [num_held_lwlocks ++ ] = lockid ;
402
404
}
403
405
You can’t perform that action at this time.
0 commit comments