aboutsummaryrefslogtreecommitdiff
path: root/src/include/storage/lwlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/storage/lwlock.h')
-rw-r--r--src/include/storage/lwlock.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index 4653e099b0d..ed9025babd1 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -177,6 +177,17 @@ extern void LWLockRegisterTranche(int tranche_id, LWLockTranche *tranche);
extern void LWLockInitialize(LWLock *lock, int tranche_id);
/*
+ * We reserve a few predefined tranche IDs. A call to LWLockNewTrancheId
+ * will never return a value less than LWTRANCHE_FIRST_USER_DEFINED.
+ */
+typedef enum BuiltinTrancheIds
+{
+ LWTRANCHE_MAIN,
+ LWTRANCHE_WAL_INSERT,
+ LWTRANCHE_FIRST_USER_DEFINED
+} BuiltinTrancheIds;
+
+/*
* Prior to PostgreSQL 9.4, we used an enum type called LWLockId to refer
* to LWLocks. New code should instead use LWLock *. However, for the
* convenience of third-party code, we include the following typedef.