Provide a way to predefine LWLock tranche IDs.
Robert Haas <rhaas@postgresql.org>
Provide a way to predefine LWLock tranche IDs. It's a bit cumbersome to use LWLockNewTrancheId(), because the returned value needs to be shared between backends so that each backend can call LWLockRegisterTranche() with the correct ID. So, for built-in tranches, use a hard-coded value instead. This is motivated by an upcoming patch adding further built-in tranches. Andres Freund and Robert Haas
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +3 −7 |
| src/backend/storage/lmgr/lwlock.c | modified | +4 −3 |
| src/include/storage/lwlock.h | modified | +11 −0 |