aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/config.sgml2
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample2
-rw-r--r--src/bin/initdb/initdb.c5
3 files changed, 6 insertions, 3 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 48478b1024a..37fd80388c0 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2036,7 +2036,7 @@ include_dir 'conf.d'
and <literal>mmap</literal> (to simulate shared memory using
memory-mapped files stored in the data directory).
Not all values are supported on all platforms; the first supported
- option is the default for that platform. The use of the
+ option is usually the default for that platform. The use of the
<literal>mmap</literal> option, which is not the default on any platform,
is generally discouraged because the operating system may write
modified pages back to disk repeatedly, increasing system I/O load;
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 48ad80cf2e8..b4bc06e5f5a 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -147,7 +147,7 @@
# sysv
# windows
# (change requires restart)
-#dynamic_shared_memory_type = posix # the default is the first option
+#dynamic_shared_memory_type = posix # the default is usually the first option
# supported by the operating system:
# posix
# sysv
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index ed6de7ca941..89b888eaa5a 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -842,11 +842,14 @@ set_null_conf(void)
* segment in dsm_impl.c; if it doesn't work, we assume it won't work for
* the postmaster either, and configure the cluster for System V shared
* memory instead.
+ *
+ * We avoid choosing Solaris's implementation of shm_open() by default. It
+ * can sleep and fail spuriously under contention.
*/
static const char *
choose_dsm_implementation(void)
{
-#ifdef HAVE_SHM_OPEN
+#if defined(HAVE_SHM_OPEN) && !defined(__sun__)
int ntries = 10;
pg_prng_state prng_state;