Re: A assert failure when initdb with track_commit_timestamp=on

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Andy Fan <zhihuifan1213(at)163(dot)com>, "'Michael Paquier'" <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A assert failure when initdb with track_commit_timestamp=on
Date: 2025-07-05 17:23:13
Message-ID: 9093.1751736193@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> writes:
> On 2025/07/05 2:17, Tom Lane wrote:
>> Oh, good point. But there doesn't seem to be any ill effect from
>> making BootstrapModeMain set BootstrapProcessing a bit earlier.

> Maybe. But I noticed that your patch also moves the line "IgnoreSystemIndexes = true;"
> earlier. Why did you make this change?

It just seemed to go with the bootstrap-mode setting. But your
example shows differently:

> This could cause initdb to fail with a PANIC error when run with ignore_system_indexes=off,
> like this:
> $ initdb -D data -c ignore_system_indexes=off
> ...
> FATAL: could not open relation with OID 2703
> PANIC: cannot abort transaction 1, it was already committed

> So perhaps "IgnoreSystemIndexes = true;" should be placed after GUCs are processed?

Yeah, we should do it like that (and probably also have a comment...)

> Or GUC ignore_system_indexes also should be treated in the same way
> as transaction_timeout?

Yes, I'd say we ought to mark that GUC as don't-accept-in-bootstrap
too. I've not done any research about what other GUCs can break
initdb, but now I'm starting to suspect there are several.

BTW, I now realize that this is only an issue starting from v16.
Before that initdb didn't have a -c switch, so there was not a
way for people to shove random settings into it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-07-05 17:34:13 Re: [PATCH] initdb: Treat empty -U argument as unset username
Previous Message Jianghua Yang 2025-07-05 16:58:09 Re: [PATCH] initdb: Treat empty -U argument as unset username