postgres.git / summary / log / commit / refs
commit 6ec1ff852f0ab13973979df311b0ac2be9e207b1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon Apr 18 17:33:07 2016 +0000
First released in: 9.6.0, 9.2.17, 9.3.13, 9.4.8, 9.5.3
Further reduce the number of semaphores used under --disable-spinlocks.
Per discussion, there doesn't seem to be much value in having
NUM_SPINLOCK_SEMAPHORES set to 1024: under any scenario where you are
running more than a few backends concurrently, you really had better have a
real spinlock implementation if you want tolerable performance. And 1024
semaphores is a sizable fraction of the system-wide SysV semaphore limit
on many platforms. Therefore, reduce this setting's default value to 128
to make it less likely to cause out-of-semaphores problems.
src/include/pg_config_manual.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index 74d7ba2010a..4aefaf7fec6 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -62,7 +62,7 @@
* may improve performance, but supplying a real spinlock implementation is
* probably far better.
*/
-#define NUM_SPINLOCK_SEMAPHORES 1024
+#define NUM_SPINLOCK_SEMAPHORES 128
/*
* Define this if you want to allow the lo_import and lo_export SQL
[parent: 35166fd7614e]