SpinLockRelease_NoHoldoff(&lock->mutex);
/* Add lock to list of locks held by this backend */
- Assert(num_held_lwlocks < MAX_SIMUL_LWLOCKS);
+ if (num_held_lwlocks >= MAX_SIMUL_LWLOCKS)
+ elog(ERROR, "too many LWLocks taken");
held_lwlocks[num_held_lwlocks++] = lockid;
/*
else
{
/* Add lock to list of locks held by this backend */
- Assert(num_held_lwlocks < MAX_SIMUL_LWLOCKS);
+ if (num_held_lwlocks >= MAX_SIMUL_LWLOCKS)
+ elog(ERROR, "too many LWLocks taken");
held_lwlocks[num_held_lwlocks++] = lockid;
}