aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml25
-rw-r--r--doc/src/sgml/runtime.sgml17
2 files changed, 36 insertions, 6 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index b6f5822b847..9b7a7388d5a 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1694,6 +1694,31 @@ include_dir 'conf.d'
</listitem>
</varlistentry>
+ <varlistentry id="guc-shared-memory-type" xreflabel="shared_memory_type">
+ <term><varname>shared_memory_type</varname> (<type>enum</type>)
+ <indexterm>
+ <primary><varname>shared_memory_type</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Specifies the shared memory implementation that the server
+ should use for the main shared memory region that holds
+ <productname>PostgreSQL</productname>'s shared buffers and other
+ shared data. Possible values are <literal>mmap</literal> (for
+ anonymous shared memory allocated using <function>mmap</function>),
+ <literal>sysv</literal> (for System V shared memory allocated via
+ <function>shmget</function>) and <literal>windows</literal> (for Windows
+ shared memory). Not all values are supported on all platforms; the
+ first supported option is the default for that platform. The use of
+ the <literal>sysv</literal> option, which is not the default on any
+ platform, is generally discouraged because it typically requires
+ non-default kernel settings to allow for large allocations (see <xref
+ linkend="sysvipc"/>).
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="guc-dynamic-shared-memory-type" xreflabel="dynamic_shared_memory_type">
<term><varname>dynamic_shared_memory_type</varname> (<type>enum</type>)
<indexterm>
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index 333adda4086..1f78f6c9569 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -638,9 +638,12 @@ psql: could not connect to server: No such file or directory
</para>
<para>
- Upon starting the server, <productname>PostgreSQL</productname> normally allocates
+ By default, <productname>PostgreSQL</productname> allocates
a very small amount of System V shared memory, as well as a much larger
- amount of POSIX (<function>mmap</function>) shared memory.
+ amount of anonymous <function>mmap</function> shared memory.
+ Alternatively, a single large System V shared memory region can be used
+ (see <xref linkend="guc-shared-memory-type"/>).
+
In addition a significant number of semaphores, which can be either
System V or POSIX style, are created at server startup. Currently,
POSIX semaphores are used on Linux and FreeBSD systems while other
@@ -752,8 +755,10 @@ psql: could not connect to server: No such file or directory
<productname>PostgreSQL</productname> requires a few bytes of System V shared memory
(typically 48 bytes, on 64-bit platforms) for each copy of the server.
On most modern operating systems, this amount can easily be allocated.
- However, if you are running many copies of the server, or if other
- applications are also using System V shared memory, it may be necessary to
+ However, if you are running many copies of the server or you explicitly
+ configure the server to use large amounts of System V shared memory (see
+ <xref linkend="guc-shared-memory-type"/> and <xref
+ linkend="guc-dynamic-shared-memory-type"/>), it may be necessary to
increase <varname>SHMALL</varname>, which is the total amount of System V shared
memory system-wide. Note that <varname>SHMALL</varname> is measured in pages
rather than bytes on many systems.
@@ -879,7 +884,7 @@ kern.ipc.semmns=512
</para>
<para>
- You might also want to configure your kernel to lock shared
+ You might also want to configure your kernel to lock System V shared
memory into RAM and prevent it from being paged out to swap.
This can be accomplished using the <command>sysctl</command>
setting <literal>kern.ipc.shm_use_phys</literal>.
@@ -928,7 +933,7 @@ kern.ipc.semmns=512
</para>
<para>
- You might also want to configure your kernel to lock shared
+ You might also want to configure your kernel to lock System V shared
memory into RAM and prevent it from being paged out to swap.
This can be accomplished using the <command>sysctl</command>
setting <literal>kern.ipc.shm_use_phys</literal>.