|
| 1 | +<!-- |
| 2 | +doc/src/sgml/ref/alter_system.sgml |
| 3 | +PostgreSQL documentation |
| 4 | +--> |
| 5 | + |
| 6 | +<refentry id="SQL-ALTERSYSTEM"> |
| 7 | + <refmeta> |
| 8 | + <refentrytitle>ALTER SYSTEM</refentrytitle> |
| 9 | + <manvolnum>7</manvolnum> |
| 10 | + <refmiscinfo>SQL - Language Statements</refmiscinfo> |
| 11 | + </refmeta> |
| 12 | + |
| 13 | + <refnamediv> |
| 14 | + <refname>ALTER SYSTEM</refname> |
| 15 | + <refpurpose>change a server configuration parameter</refpurpose> |
| 16 | + </refnamediv> |
| 17 | + |
| 18 | + <indexterm zone="sql-altersystem"> |
| 19 | + <primary>ALTER SYSTEM</primary> |
| 20 | + </indexterm> |
| 21 | + |
| 22 | + <refsynopsisdiv> |
| 23 | +<synopsis> |
| 24 | +ALTER SYSTEM SET <replaceable class="PARAMETER">configuration_parameter</replaceable> { TO | = } { <replaceable class="PARAMETER">value</replaceable> | '<replaceable class="PARAMETER">value</replaceable>' | DEFAULT } |
| 25 | +</synopsis> |
| 26 | + </refsynopsisdiv> |
| 27 | + |
| 28 | + <refsect1> |
| 29 | + <title>Description</title> |
| 30 | + |
| 31 | + <para> |
| 32 | + <command>ALTER SYSTEM</command> writes the configuration parameter |
| 33 | + values to the <filename>postgresql.auto.conf</filename> file. With |
| 34 | + <literal>DEFAULT</literal>, it removes a configuration entry from |
| 35 | + <filename>postgresql.auto.conf</filename> file. The values will be |
| 36 | + effective after reload of server configuration (SIGHUP) or in next |
| 37 | + server start based on the type of configuration parameter modified. |
| 38 | + </para> |
| 39 | + |
| 40 | + <para> |
| 41 | + This command is not allowed inside transaction block or function. |
| 42 | + </para> |
| 43 | + |
| 44 | + <para> |
| 45 | + See <xref linkend="config-setting"> for other ways to set the parameters and |
| 46 | + how they become effective. |
| 47 | + </para> |
| 48 | + </refsect1> |
| 49 | + |
| 50 | + <refsect1> |
| 51 | + <title>Parameters</title> |
| 52 | + |
| 53 | + <variablelist> |
| 54 | + <varlistentry> |
| 55 | + <term><replaceable class="parameter">configuration_parameter</replaceable></term> |
| 56 | + <listitem> |
| 57 | + <para> |
| 58 | + Name of a settable run-time parameter. Available parameters are |
| 59 | + documented in <xref linkend="runtime-config">. |
| 60 | + </para> |
| 61 | + </listitem> |
| 62 | + </varlistentry> |
| 63 | + |
| 64 | + <varlistentry> |
| 65 | + <term><replaceable class="parameter">value</replaceable></term> |
| 66 | + <listitem> |
| 67 | + <para> |
| 68 | + New value of parameter. Values can be specified as string |
| 69 | + constants, identifiers, numbers, or comma-separated lists of |
| 70 | + these, as appropriate for the particular parameter. |
| 71 | + <literal>DEFAULT</literal> can be written to specify to remove the |
| 72 | + parameter and its value from <filename>postgresql.auto.conf</filename> |
| 73 | + </para> |
| 74 | + </listitem> |
| 75 | + </varlistentry> |
| 76 | + </variablelist> |
| 77 | + </refsect1> |
| 78 | + |
| 79 | + <refsect1> |
| 80 | + <title>Examples</title> |
| 81 | + |
| 82 | + <para> |
| 83 | + Set the <literal>wal_level</>: |
| 84 | +<programlisting> |
| 85 | +ALTER SYSTEM SET wal_level = hot_standby; |
| 86 | +</programlisting> |
| 87 | + </para> |
| 88 | + |
| 89 | + <para> |
| 90 | + Set the <literal>authentication_timeout</>: |
| 91 | +<programlisting> |
| 92 | +ALTER SYSTEM SET authentication_timeout = 10; |
| 93 | +</programlisting></para> |
| 94 | + </refsect1> |
| 95 | + |
| 96 | + <refsect1> |
| 97 | + <title>Compatibility</title> |
| 98 | + |
| 99 | + <para> |
| 100 | + The <command>ALTER SYSTEM</command> statement is a |
| 101 | + <productname>PostgreSQL</productname> extension. |
| 102 | + </para> |
| 103 | + </refsect1> |
| 104 | + |
| 105 | + <refsect1> |
| 106 | + <title>See Also</title> |
| 107 | + |
| 108 | + <simplelist type="inline"> |
| 109 | + <member><xref linkend="SQL-SET"></member> |
| 110 | + <member><xref linkend="SQL-SHOW"></member> |
| 111 | + </simplelist> |
| 112 | + </refsect1> |
| 113 | + |
| 114 | +</refentry> |