Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads

ALTER SYSTEM

Name

ALTER SYSTEM -- change a server configuration parameter

Synopsis

ALTER SYSTEM SETconfiguration_parameter { TO | = } {value | 'value' | DEFAULT }ALTER SYSTEM RESETconfiguration_parameterALTER SYSTEM RESET ALL

Description

ALTER SYSTEM is used for changing server configuration parameters across the entire database cluster. It can be more convenient than the traditional method of manually editing thepostgresql.conf file.ALTER SYSTEM writes the given parameter setting to thepostgresql.auto.conf file, which is read in addition topostgresql.conf. Setting a parameter toDEFAULT, or using theRESET variant, removes that configuration entry from thepostgresql.auto.conf file. UseRESET ALL to remove all such configuration entries.

Values set withALTER SYSTEM will be effective after the next server configuration reload (SIGHUP orpg_ctl reload), or after the next server restart in the case of parameters that can only be changed at server start.

Only superusers can useALTER SYSTEM. Also, since this command acts directly on the file system and cannot be rolled back, it is not allowed inside a transaction block or function.

Parameters

configuration_parameter

Name of a settable configuration parameter. Available parameters are documented inChapter 18.

value

New value of the parameter. Values can be specified as string constants, identifiers, numbers, or comma-separated lists of these, as appropriate for the particular parameter.DEFAULT can be written to specify removing the parameter and its value frompostgresql.auto.conf.

Notes

This command can't be used to setdata_directory, nor parameters that are not allowed inpostgresql.conf (e.g.,preset options).

SeeSection 18.1 for other ways to set the parameters.

Examples

Set thewal_level:

ALTER SYSTEM SET wal_level = hot_standby;

Undo that, restoring whatever setting was effective inpostgresql.conf:

ALTER SYSTEM RESET wal_level;

Compatibility

TheALTER SYSTEM statement is aPostgreSQL extension.

See Also

SET,SHOW

PrevHomeNext
ALTER SERVERUpALTER TABLE
Go to PostgreSQL 9.4
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp