Re: Set arbitrary GUC options during initdb

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Set arbitrary GUC options during initdb
Date: 2023-01-27 14:48:53
Message-ID: 8a8fda29-5a68-ba68-a2ff-8d17602b3762@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25.01.23 22:25, Tom Lane wrote:
> So this invents an initdb switch "-c NAME=VALUE" just like the
> one that the server itself has long had.

This seems useful.

> 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
> postmaster starts.

I would have expected them to be edited into postgresql.conf. What are
the arguments for one or the other?

Btw., something that I have had in my notes for a while, but with this
it would now be officially exposed: Not all options can be safely set
during bootstrap. For example,

initdb -D data -c track_commit_timestamp=on

will fail an assertion. This might be an exception, or there might be
others.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-01-27 14:53:29 Re: New strategies for freezing, advancing relfrozenxid early
Previous Message Robert Haas 2023-01-27 14:48:43 Re: New strategies for freezing, advancing relfrozenxid early