Add "-c name=value" switch to initdb.
authorTom Lane <[email protected]>
Wed, 22 Mar 2023 17:48:44 +0000 (13:48 -0400)
committerTom Lane <[email protected]>
Wed, 22 Mar 2023 17:49:05 +0000 (13:49 -0400)
commit3e51b278db6a4e2f50f3f6b9edc9667af1f934fd
tree0af7a9ad2e3fa0b15d1aeec2c5bfac63fda66af4
parent5df319f3d55d09fadb4f7e4b58c5b476a3aeceb4
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
doc/src/sgml/ref/initdb.sgml
src/bin/initdb/initdb.c
src/bin/initdb/t/001_initdb.pl