]> granicus.if.org Git - postgresql/commit
Provide a way to predefine LWLock tranche IDs.
authorRobert Haas <rhaas@postgresql.org>
Tue, 15 Dec 2015 16:32:13 +0000 (11:32 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 15 Dec 2015 16:48:19 +0000 (11:48 -0500)
commit3fed417452b226d9bd85a3a54d7056b06eb14897
tree69b9cd4377eda27301540f2e1ae24f2dbe02db32
parent43cd468cf01007f39312af05c4c92ceb6de8afd8
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
src/backend/access/transam/xlog.c
src/backend/storage/lmgr/lwlock.c
src/include/storage/lwlock.h