fix order of LWLock tranches (LWTRANCHE_FIRST_USER_DEFINED last)
authorTomas Vondra <[email protected]>
Mon, 9 Jan 2017 20:51:25 +0000 (21:51 +0100)
committerTomas Vondra <[email protected]>
Mon, 9 Jan 2017 20:51:25 +0000 (21:51 +0100)
Clearly LWTRANCHE_FIRST_USER_DEFINED is a special name, meant to be
the last one in the array of IDs. Asserts in RegisterLWLockTranches
rely on this, for example.

src/include/storage/lwlock.h

index 42a5bf7c264a497e63d9fb9fe2930f006e91f1d2..a8dfbf2ee6b10d5d7eb64a364bd7eb93ac29935d 100644 (file)
@@ -235,8 +235,8 @@ typedef enum BuiltinTrancheIds
        LWTRANCHE_BUFFER_MAPPING,
        LWTRANCHE_LOCK_MANAGER,
        LWTRANCHE_PREDICATE_LOCK_MANAGER,
-       LWTRANCHE_FIRST_USER_DEFINED,
-       LWTRANCHE_SHARED_QUEUES
+       LWTRANCHE_SHARED_QUEUES,
+       LWTRANCHE_FIRST_USER_DEFINED
 }      BuiltinTrancheIds;
 
 /*