4 The view pg_settings provides access to run-time parameters of the
5 server. It is essentially an alternative interface to the SHOW and SET
6 commands. It also provides access to some facts about each parameter
7 that are not directly available from SHOW, such as minimum and maximum
10 Table 53.25. pg_settings Columns
18 Run-time configuration parameter name
22 Current value of the parameter
26 Implicit unit of the parameter
30 Logical group of the parameter
34 A brief description of the parameter
38 Additional, more detailed, description of the parameter
42 Context required to set the parameter's value (see below)
46 Parameter type (bool, enum, integer, real, or string)
50 Source of the current parameter value
54 Minimum allowed value of the parameter (null for non-numeric values)
58 Maximum allowed value of the parameter (null for non-numeric values)
62 Allowed values of an enum parameter (null for non-enum values)
66 Parameter value assumed at server startup if the parameter is not
71 Value that RESET would reset the parameter to in the current session
75 Configuration file the current value was set in (null for values set
76 from sources other than configuration files, or when examined by a user
77 who neither is a superuser nor has privileges of pg_read_all_settings);
78 helpful when using include directives in configuration files
82 Line number within the configuration file the current value was set at
83 (null for values set from sources other than configuration files, or
84 when examined by a user who neither is a superuser nor has privileges
85 of pg_read_all_settings).
89 true if the value has been changed in the configuration file but needs
90 a restart; or false otherwise.
92 There are several possible values of context. In order of decreasing
93 difficulty of changing the setting, they are:
96 These settings cannot be changed directly; they reflect
97 internally determined values. Some of them may be adjustable by
98 rebuilding the server with different configuration options, or
99 by changing options supplied to initdb.
102 These settings can only be applied when the server starts, so
103 any change requires restarting the server. Values for these
104 settings are typically stored in the postgresql.conf file, or
105 passed on the command line when starting the server. Of course,
106 settings with any of the lower context types can also be set at
110 Changes to these settings can be made in postgresql.conf without
111 restarting the server. Send a SIGHUP signal to the postmaster to
112 cause it to re-read postgresql.conf and apply the changes. The
113 postmaster will also forward the SIGHUP signal to its child
114 processes so that they all pick up the new value.
117 Changes to these settings can be made in postgresql.conf without
118 restarting the server. They can also be set for a particular
119 session in the connection request packet (for example, via
120 libpq's PGOPTIONS environment variable), but only if the
121 connecting user is a superuser or has been granted the
122 appropriate SET privilege. However, these settings never change
123 in a session after it is started. If you change them in
124 postgresql.conf, send a SIGHUP signal to the postmaster to cause
125 it to re-read postgresql.conf. The new values will only affect
126 subsequently-launched sessions.
129 Changes to these settings can be made in postgresql.conf without
130 restarting the server. They can also be set for a particular
131 session in the connection request packet (for example, via
132 libpq's PGOPTIONS environment variable); any user can make such
133 a change for their session. However, these settings never change
134 in a session after it is started. If you change them in
135 postgresql.conf, send a SIGHUP signal to the postmaster to cause
136 it to re-read postgresql.conf. The new values will only affect
137 subsequently-launched sessions.
140 These settings can be set from postgresql.conf, or within a
141 session via the SET command; but only superusers and users with
142 the appropriate SET privilege can change them via SET. Changes
143 in postgresql.conf will affect existing sessions only if no
144 session-local value has been established with SET.
147 These settings can be set from postgresql.conf, or within a
148 session via the SET command. Any user is allowed to change their
149 session-local value. Changes in postgresql.conf will affect
150 existing sessions only if no session-local value has been
151 established with SET.
153 See Section 19.1 for more information about the various ways to change
156 This view cannot be inserted into or deleted from, but it can be
157 updated. An UPDATE applied to a row of pg_settings is equivalent to
158 executing the SET command on that named parameter. The change only
159 affects the value used by the current session. If an UPDATE is issued
160 within a transaction that is later aborted, the effects of the UPDATE
161 command disappear when the transaction is rolled back. Once the
162 surrounding transaction is committed, the effects will persist until
163 the end of the session, unless overridden by another UPDATE or SET.
165 This view does not display customized options unless the extension
166 module that defines them has been loaded by the backend process
167 executing the query (e.g., via a mention in shared_preload_libraries, a
168 call to a C function in the extension, or the LOAD command). For
169 example, since archive modules are normally loaded only by the archiver
170 process not regular sessions, this view will not display any customized
171 options defined by such modules unless special action is taken to load
172 them into the backend process executing the query.