Fix off-by-one bug in LWLockRegisterTranche().
Tom Lane <tgl@sss.pgh.pa.us>
Fix off-by-one bug in LWLockRegisterTranche(). Original coding failed to enlarge the array as required if the requested tranche_id was equal to LWLockTranchesAllocated. In passing, fix poor style of not casting the result of (re)palloc.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/lmgr/lwlock.c | modified | +7 −5 |