Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3cd7edf

Browse files
committed
> > This patch improves the documentation for the shared_buffers GUC param.
> > I'd suggest that the runtime.sgml description explicitly say "values of > at least a few thousand are recommended for production installations". Neil Conway
1 parent ef581f0 commit 3cd7edf

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.165 2002/12/27 14:06:34 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.166 2003/01/11 05:04:14 momjian Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -380,11 +380,12 @@ FATAL 1: ShmemCreate: cannot create region
380380
<screen>
381381
IpcSemaphoreCreate: semget(key=5440026, num=16, 01600) failed: No space left on device
382382
</screen>
383-
does <emphasis>not</emphasis> mean you've run out of disk space. It
384-
means your kernel's limit on the number of System V semaphores is
385-
smaller than the number <productname>PostgreSQL</productname> wants
386-
to create. As above, you may be able to work around the problem by
387-
starting the postmaster with a reduced number of allowed connections
383+
does <emphasis>not</emphasis> mean you've run out of disk
384+
space. It means your kernel's limit on the number of <systemitem
385+
class="osname">System V</> semaphores is smaller than the number
386+
<productname>PostgreSQL</productname> wants to create. As above,
387+
you may be able to work around the problem by starting the
388+
postmaster with a reduced number of allowed connections
388389
(<option>-N</option> switch), but you'll eventually want to
389390
increase the kernel limit.
390391
</para>
@@ -1838,8 +1839,21 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
18381839
<listitem>
18391840
<para>
18401841
Sets the number of shared memory buffers used by the database
1841-
server. The default is 64. Each buffer is typically 8192 bytes.
1842-
This option can only be set at server start.
1842+
server. The default is 64. Each buffer is typically 8192
1843+
bytes. This must be greater than 16, as well as at least twice
1844+
the value of <varname>MAX_CONNECTIONS</varname>; however, a
1845+
higher value can often improve performance on modern
1846+
machines. Values of at least a few thousand are recommended
1847+
for production installations. This option can only be set at
1848+
server start.
1849+
</para>
1850+
1851+
<para>
1852+
Increasing this parameter may cause <productname>PostgreSQL</>
1853+
to request more <systemitem class="osname">System V</> shared
1854+
memory than your operating system's default configuration
1855+
allows. See <xref linkend="sysvipc"> for information on how to
1856+
adjust these parameters, if necessary.
18431857
</para>
18441858
</listitem>
18451859
</varlistentry>
@@ -2165,8 +2179,9 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
21652179
<term><varname>WAL_BUFFERS</varname> (<type>integer</type>)</term>
21662180
<listitem>
21672181
<para>
2168-
Number of disk-page buffers in shared memory for WAL logging.
2169-
This option can only be set at server start.
2182+
Number of disk-page buffers in shared memory for WAL
2183+
logging. The default is 4. This option can only be set at
2184+
server start.
21702185
</para>
21712186
</listitem>
21722187
</varlistentry>

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#
4848
# Shared Memory Size
4949
#
50-
#shared_buffers = 64 # 2*max_connections, min 16, typically 8KB each
50+
#shared_buffers = 64 # at least 2*max_connections, min 16, 8KB each
5151
#max_fsm_relations = 1000 # min 10, fsm is free space map, ~40 bytes
5252
#max_fsm_pages = 10000 # min 1000, fsm is free space map, ~6 bytes
5353
#max_locks_per_transaction = 64 # min 10

0 commit comments

Comments
 (0)