Divide the lock manager's shared state into 'partitions', so as to
Tom Lane <tgl@sss.pgh.pa.us>
Divide the lock manager's shared state into 'partitions', so as to reduce contention for the former single LockMgrLock. Per my recent proposal. I set it up for 16 partitions, but on a pgbench test this gives only a marginal further improvement over 4 partitions --- we need to test more scenarios to choose the number of partitions.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/twophase.c | modified | +3 −2 |
| src/backend/storage/ipc/procarray.c | modified | +3 −3 |
| src/backend/storage/lmgr/deadlock.c | modified | +6 −14 |
| src/backend/storage/lmgr/lock.c | modified | +429 −290 |
| src/backend/storage/lmgr/lwlock.c | modified | +9 −5 |
| src/backend/storage/lmgr/proc.c | modified | +76 −52 |
| src/backend/storage/lmgr/README | modified | +74 −17 |
| src/include/storage/lock.h | modified | +11 −2 |
| src/include/storage/lwlock.h | modified | +5 −7 |
| src/include/storage/proc.h | modified | +11 −7 |