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

Commit e148443

Browse files
committed
Document guc context values, and reference them from the config doc section.
Tom Lane
1 parent 5b079cb commit e148443

File tree

2 files changed

+99
-5
lines changed

2 files changed

+99
-5
lines changed

doc/src/sgml/catalogs.sgml

+93-1
Original file line numberDiff line numberDiff line change
@@ -7628,7 +7628,7 @@
76287628
<row>
76297629
<entry><structfield>context</structfield></entry>
76307630
<entry><type>text</type></entry>
7631-
<entry>Context required to set the parameter's value</entry>
7631+
<entry>Context required to set the parameter's value (see below)</entry>
76327632
</row>
76337633
<row>
76347634
<entry><structfield>vartype</structfield></entry>
@@ -7692,6 +7692,98 @@
76927692
</tgroup>
76937693
</table>
76947694

7695+
<para>
7696+
There are several possible values of <structfield>context</structfield>.
7697+
In order of decreasing difficulty of changing the setting, they are:
7698+
</para>
7699+
7700+
<variablelist>
7701+
<varlistentry>
7702+
<term><literal>internal</literal></term>
7703+
<listitem>
7704+
<para>
7705+
These settings cannot be changed directly; they reflect internally
7706+
determined values. Some of them may be adjustable by rebuilding the
7707+
server with different configuration options, or by changing options
7708+
supplied to <command>initdb</command>.
7709+
</para>
7710+
</listitem>
7711+
</varlistentry>
7712+
<varlistentry>
7713+
<term><literal>postmaster</literal></term>
7714+
<listitem>
7715+
<para>
7716+
These settings can only be applied when the server starts, so any change
7717+
requires restarting the server. Values for these settings are typically
7718+
stored in the <filename>postgresql.conf</filename> file, or passed on
7719+
the command line when starting the server. Of course, settings with any
7720+
of the lower <structfield>context</structfield> types can also be
7721+
set at server start time.
7722+
</para>
7723+
</listitem>
7724+
</varlistentry>
7725+
<varlistentry>
7726+
<term><literal>sighup</literal></term>
7727+
<listitem>
7728+
<para>
7729+
Changes to these settings can be made in
7730+
<filename>postgresql.conf</filename> without restarting the server.
7731+
Send a <systemitem>SIGHUP</systemitem> signal to the postmaster to
7732+
cause it to re-read <filename>postgresql.conf</filename> and apply
7733+
the changes. The postmaster will also forward the
7734+
<systemitem>SIGHUP</systemitem> signal to its child processes so that
7735+
they all pick up the new value.
7736+
</para>
7737+
</listitem>
7738+
</varlistentry>
7739+
<varlistentry>
7740+
<term><literal>backend</literal></term>
7741+
<listitem>
7742+
<para>
7743+
Changes to these settings can be made in
7744+
<filename>postgresql.conf</filename> without restarting the server;
7745+
they can also be set for a particular session in the connection request
7746+
packet (for example, via <application>libpq</>'s <literal>PGOPTIONS</>
7747+
environment variable). However, these settings never change in a
7748+
session after it is started. If you change them in
7749+
<filename>postgresql.conf</filename>, send a
7750+
<systemitem>SIGHUP</systemitem> signal to the postmaster to cause it to
7751+
re-read <filename>postgresql.conf</filename>. The new values will only
7752+
affect subsequently-launched sessions.
7753+
</para>
7754+
</listitem>
7755+
</varlistentry>
7756+
<varlistentry>
7757+
<term><literal>superuser</literal></term>
7758+
<listitem>
7759+
<para>
7760+
These settings can be set from <filename>postgresql.conf</filename>,
7761+
or within a session via the <command>SET</> command; but only superusers
7762+
can change them via <command>SET</>. Changes in
7763+
<filename>postgresql.conf</filename> will affect existing sessions
7764+
only if no session-local value has been established with <command>SET</>.
7765+
</para>
7766+
</listitem>
7767+
</varlistentry>
7768+
<varlistentry>
7769+
<term><literal>user</literal></term>
7770+
<listitem>
7771+
<para>
7772+
These settings can be set from <filename>postgresql.conf</filename>,
7773+
or within a session via the <command>SET</> command. Any user is
7774+
allowed to change his session-local value. Changes in
7775+
<filename>postgresql.conf</filename> will affect existing sessions
7776+
only if no session-local value has been established with <command>SET</>.
7777+
</para>
7778+
</listitem>
7779+
</varlistentry>
7780+
</variablelist>
7781+
7782+
<para>
7783+
See <xref linkend="config-setting"> for more information about the various
7784+
ways to change these parameters.
7785+
</para>
7786+
76957787
<para>
76967788
The <structname>pg_settings</structname> view cannot be inserted into or
76977789
deleted from, but it can be updated. An <command>UPDATE</command> applied

doc/src/sgml/config.sgml

+6-4
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,12 @@ SET ENABLE_SEQSCAN TO OFF;
166166
</para>
167167

168168
<para>
169-
The virtual table <structname>pg_settings</structname>
170-
(described in <xref linkend="view-pg-settings">) also allows
171-
displaying and updating session run-time parameters. It is equivalent
172-
to <command>SHOW</> and <command>SET</>, but can be more convenient
169+
The virtual table <structname>pg_settings</structname> also allows
170+
displaying and updating session run-time parameters; see <xref
171+
linkend="view-pg-settings"> for details and a description of the
172+
different variable types and when they can be changed.
173+
<structname>pg_settings</structname> is equivalent to <command>SHOW</>
174+
and <command>SET</>, but can be more convenient
173175
to use because it can be joined with other tables, or selected from using
174176
any desired selection condition. It also contains more information about
175177
what values are allowed for the parameters.

0 commit comments

Comments
 (0)