Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
52.24. pg_settings
Prev UpChapter 52. System ViewsHome Next

52.24. pg_settings#

The viewpg_settings provides access to run-time parameters of the server. It is essentially an alternative interface to theSHOW andSET commands. It also provides access to some facts about each parameter that are not directly available fromSHOW, such as minimum and maximum values.

Table 52.24. pg_settings Columns

Column Type

Description

nametext

Run-time configuration parameter name

settingtext

Current value of the parameter

unittext

Implicit unit of the parameter

categorytext

Logical group of the parameter

short_desctext

A brief description of the parameter

extra_desctext

Additional, more detailed, description of the parameter

contexttext

Context required to set the parameter's value (see below)

vartypetext

Parameter type (bool,enum,integer,real, orstring)

sourcetext

Source of the current parameter value

min_valtext

Minimum allowed value of the parameter (null for non-numeric values)

max_valtext

Maximum allowed value of the parameter (null for non-numeric values)

enumvalstext[]

Allowed values of an enum parameter (null for non-enum values)

boot_valtext

Parameter value assumed at server startup if the parameter is not otherwise set

reset_valtext

Value thatRESET would reset the parameter to in the current session

sourcefiletext

Configuration file the current value was set in (null for values set from sources other than configuration files, or when examined by a user who neither is a superuser nor has privileges ofpg_read_all_settings); helpful when usinginclude directives in configuration files

sourcelineint4

Line number within the configuration file the current value was set at (null for values set from sources other than configuration files, or when examined by a user who neither is a superuser nor has privileges ofpg_read_all_settings).

pending_restartbool

true if the value has been changed in the configuration file but needs a restart; orfalse otherwise.


There are several possible values ofcontext. 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 toinitdb.

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 thepostgresql.conf file, or passed on the command line when starting the server. Of course, settings with any of the lowercontext types can also be set at server start time.

sighup

Changes to these settings can be made inpostgresql.conf without restarting the server. Send aSIGHUP signal to the postmaster to cause it to re-readpostgresql.conf and apply the changes. The postmaster will also forward theSIGHUP signal to its child processes so that they all pick up the new value.

superuser-backend

Changes to these settings can be made inpostgresql.conf without restarting the server. They can also be set for a particular session in the connection request packet (for example, vialibpq'sPGOPTIONS environment variable), but only if the connecting user is a superuser or has been granted the appropriateSET privilege. However, these settings never change in a session after it is started. If you change them inpostgresql.conf, send aSIGHUP signal to the postmaster to cause it to re-readpostgresql.conf. The new values will only affect subsequently-launched sessions.

backend

Changes to these settings can be made inpostgresql.conf without restarting the server. They can also be set for a particular session in the connection request packet (for example, vialibpq'sPGOPTIONS environment variable); any user can make such a change for their session. However, these settings never change in a session after it is started. If you change them inpostgresql.conf, send aSIGHUP signal to the postmaster to cause it to re-readpostgresql.conf. The new values will only affect subsequently-launched sessions.

superuser

These settings can be set frompostgresql.conf, or within a session via theSET command; but only superusers and users with the appropriateSET privilege can change them viaSET. Changes inpostgresql.conf will affect existing sessions only if no session-local value has been established withSET.

user

These settings can be set frompostgresql.conf, or within a session via theSET command. Any user is allowed to change their session-local value. Changes inpostgresql.conf will affect existing sessions only if no session-local value has been established withSET.

SeeSection 18.1 for more information about the various ways to change these parameters.

This view cannot be inserted into or deleted from, but it can be updated. AnUPDATE applied to a row ofpg_settings is equivalent to executing theSET command on that named parameter. The change only affects the value used by the current session. If anUPDATE is issued within a transaction that is later aborted, the effects of theUPDATE command disappear when the transaction is rolled back. Once the surrounding transaction is committed, the effects will persist until the end of the session, unless overridden by anotherUPDATE orSET.

This view does not displaycustomized options unless the extension module that defines them has been loaded by the backend process executing the query (e.g., via a mention inshared_preload_libraries, a call to a C function in the extension, or theLOAD command). For example, sincearchive modules are normally loaded only by the archiver process not regular sessions, this view will not display any customized options defined by such modules unless special action is taken to load them into the backend process executing the query.


Prev Up Next
52.23. pg_sequences Home 52.25. pg_shadow
pdfepub
Go to Postgres Pro Standard 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp