summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-03-22 13:48:44 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-03-22 13:49:05 -0400
commit3e51b278db6a4e2f50f3f6b9edc9667af1f934fd (patch)
tree0af7a9ad2e3fa0b15d1aeec2c5bfac63fda66af4 /doc/src
parent5df319f3d55d09fadb4f7e4b58c5b476a3aeceb4 (diff)
Add "-c name=value" switch to initdb.
This option, or its long form --set, sets the GUC "name" to "value". The setting applies in the bootstrap and standalone servers run by initdb, and is also written into the generated postgresql.conf. This can save an extra editing step when creating a new cluster, but the real use-case is for coping with situations where the bootstrap server fails to start due to environmental issues; for example, if it's necessary to force huge_pages to off. Discussion: https://postgr.es/m/2844176.1674681919@sss.pgh.pa.us
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/initdb.sgml17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index daebe75ee40..87945b4b62f 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -464,6 +464,23 @@ PostgreSQL documentation
Other, less commonly used, options are also available:
<variablelist>
+ <varlistentry id="app-initdb-option-set">
+ <term><option>-c <replaceable>name</replaceable>=<replaceable>value</replaceable></option></term>
+ <term><option>--set <replaceable>name</replaceable>=<replaceable>value</replaceable></option></term>
+ <listitem>
+ <para>
+ Forcibly set the server parameter <replaceable>name</replaceable>
+ to <replaceable>value</replaceable> during <command>initdb</command>,
+ and also install that setting in the
+ generated <filename>postgresql.conf</filename> file,
+ so that it will apply during future server runs.
+ This option can be given more than once to set several parameters.
+ It is primarily useful when the environment is such that the server
+ will not start at all using the default parameters.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="app-initdb-option-debug">
<term><option>-d</option></term>
<term><option>--debug</option></term>