|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|Subject:||Set arbitrary GUC options during initdb|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
The attached patch responds to the discussion at  about how
we ought to offer a way to set any server GUC from the initdb
command line. Currently, if for some reason the server won't
start with default parameters, the only way to get through initdb
is to change the installed version of postgresql.conf.sample.
And even that is just a kluge, because the initial probes to
choose max_connections and shared_buffers will all fail, causing
initdb to choose rock-bottom-minimum values of those settings.
You can fix that up after the fact if you notice it, but you
So this invents an initdb switch "-c NAME=VALUE" just like the
one that the server itself has long had. The specified settings
are applied on the command line of the initial probe calls
(which happen before we've made any config files), and then they
are added to postgresql.auto.conf, which causes them to take
effect for the bootstrap backend runs as well as subsequent
I also invented "--set NAME=VALUE", mainly because just about
every other initdb switch has a long form. The server itself
doesn't have that spelling, so I'm not wedded to that part.
regards, tom lane
|Next Message||Andres Freund||2023-01-25 21:26:49||Re: plpython vs _POSIX_C_SOURCE|
|Previous Message||Jeff Davis||2023-01-25 21:16:44||Re: GUCs to control abbreviated sort keys|