| From: | Robert Haas <rhaas(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Provide a way to predefine LWLock tranche IDs. |
| Date: | 2015-12-15 16:49:03 |
| Message-ID: | E1a8smd-0003b7-QT@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/3fed417452b226d9bd85a3a54d7056b06eb14897
Modified Files
--------------
src/backend/access/transam/xlog.c | 10 +++-------
src/backend/storage/lmgr/lwlock.c | 7 ++++---
src/include/storage/lwlock.h | 11 +++++++++++
3 files changed, 18 insertions(+), 10 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2015-12-15 18:47:53 | pgsql: Move buffer I/O and content LWLocks out of the main tranche. |
| Previous Message | Stephen Frost | 2015-12-15 15:08:37 | pgsql: Improve CREATE POLICY documentation |