From e148443ddd95cd29edf4cc1de6188eb9cee029c5 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 17 Mar 2011 00:26:03 -0400 Subject: [PATCH] Document guc context values, and reference them from the config doc section. Tom Lane --- doc/src/sgml/catalogs.sgml | 94 +++++++++++++++++++++++++++++++++++++- doc/src/sgml/config.sgml | 10 ++-- 2 files changed, 99 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 64d1cda899..d0a8dc72cb 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -7628,7 +7628,7 @@ context text - Context required to set the parameter's value + Context required to set the parameter's value (see below) vartype @@ -7692,6 +7692,98 @@ + + There are several possible values of context. + In order of decreasing difficulty of changing the setting, they are: + + + + + internal + + + These settings cannot be changed directly; they reflect internally + determined values. Some of them may be adjustable by rebuilding the + server with different configuration options, or by changing options + supplied to initdb. + + + + + postmaster + + + These settings can only be applied when the server starts, so any change + requires restarting the server. Values for these settings are typically + stored in the postgresql.conf file, or passed on + the command line when starting the server. Of course, settings with any + of the lower context types can also be + set at server start time. + + + + + sighup + + + Changes to these settings can be made in + postgresql.conf without restarting the server. + Send a SIGHUP signal to the postmaster to + cause it to re-read postgresql.conf and apply + the changes. The postmaster will also forward the + SIGHUP signal to its child processes so that + they all pick up the new value. + + + + + backend + + + Changes to these settings can be made in + postgresql.conf without restarting the server; + they can also be set for a particular session in the connection request + packet (for example, via libpq's PGOPTIONS + environment variable). However, these settings never change in a + session after it is started. If you change them in + postgresql.conf, send a + SIGHUP signal to the postmaster to cause it to + re-read postgresql.conf. The new values will only + affect subsequently-launched sessions. + + + + + superuser + + + These settings can be set from postgresql.conf, + or within a session via the SET command; but only superusers + can change them via SET. Changes in + postgresql.conf will affect existing sessions + only if no session-local value has been established with SET. + + + + + user + + + These settings can be set from postgresql.conf, + or within a session via the SET command. Any user is + allowed to change his session-local value. Changes in + postgresql.conf will affect existing sessions + only if no session-local value has been established with SET. + + + + + + + See for more information about the various + ways to change these parameters. + + The pg_settings view cannot be inserted into or deleted from, but it can be updated. An UPDATE applied diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 212f426b3c..7326771bcf 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -166,10 +166,12 @@ SET ENABLE_SEQSCAN TO OFF; - The virtual table pg_settings - (described in ) also allows - displaying and updating session run-time parameters. It is equivalent - to SHOW and SET, but can be more convenient + The virtual table pg_settings also allows + displaying and updating session run-time parameters; see for details and a description of the + different variable types and when they can be changed. + pg_settings is equivalent to SHOW + and SET, but can be more convenient to use because it can be joined with other tables, or selected from using any desired selection condition. It also contains more information about what values are allowed for the parameters.