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-04-14 08:29:53
Message-ID: 0307b599-9528-643d-934c-a7e76d376e94@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27.01.23 15:48, Peter Eisentraut wrote:
> 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.

I ran a test across all changeable boolean parameters with initdb
setting it to the opposite of their default. The only one besides
track_commit_timestamp that caused initdb to not complete was
default_transaction_read_only, which is to be expected.

We should fix track_commit_timestamp, but it doesn't look like there is
wider impact. (Obviously, this tested only boolean settings. If
someone wants to fuzz-test the others ...)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2023-04-14 09:12:24 Re: Adding argument names to aggregate functions
Previous Message Daniel Gustafsson 2023-04-14 08:12:51 Re: User functions for building SCRAM secrets