From c1772ad9225641c921545b35c84ee478c326b95e Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 4 Feb 2016 16:43:04 -0500 Subject: Change the way that LWLocks for extensions are allocated. The previous RequestAddinLWLocks() method had several disadvantages. First, the locks would be in the main tranche; we've recently decided that it's useful for LWLocks used for separate purposes to have separate tranche IDs. Second, there wasn't any correlation between what code called RequestAddinLWLocks() and what code called LWLockAssign(); when multiple modules are in use, it could become quite difficult to troubleshoot problems where LWLockAssign() ran out of locks. To fix, create a concept of named LWLock tranches which can be used either by extension or by core code. Amit Kapila and Robert Haas --- src/include/pg_config_manual.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/include/pg_config_manual.h') diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index 383809bf5d8..ef895211da5 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -51,11 +51,6 @@ #define SEQ_MAXVALUE PG_INT64_MAX #define SEQ_MINVALUE (-SEQ_MAXVALUE) -/* - * Number of spare LWLocks to allocate for user-defined add-on code. - */ -#define NUM_USER_DEFINED_LWLOCKS 4 - /* * When we don't have native spinlocks, we use semaphores to simulate them. * Decreasing this value reduces consumption of OS resources; increasing it -- cgit v1.2.3