Add "-c name=value" switch to initdb.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3e51b278db6a4e2f50f3f6b9edc9667af1f934fd
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-03-22T17:49:05Z
Releases: 16.0
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

Files

PathChange+/−
doc/src/sgml/ref/initdb.sgml modified +17 −0
src/bin/initdb/initdb.c modified +358 −116
src/bin/initdb/t/001_initdb.pl modified +10 −1

Documentation touched

Discussion