public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Hayato Kuroda (Fujitsu) <[email protected]>
To: '[email protected]' <[email protected]>
Subject: Re: initdb -c "track_commit_timestamp=on" crashes in case of debug build
Date: Mon, 6 Jan 2025 15:41:54 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <OSCPR01MB14966FF9E4C4145F37B937E52F5102@OSCPR01MB14966.jpnprd01.prod.outlook.com>
References: <OSCPR01MB14966FF9E4C4145F37B937E52F5102@OSCPR01MB14966.jpnprd01.prod.outlook.com>

On 06.01.25 14:14, Hayato Kuroda (Fujitsu) wrote:
> While working on another thread I found $subject. I've tested only on master,
> but I doubt this could happen even on PG16 and 17. You can reproduce by:
> ```
> $ initdb -D data -c "track_commit_timestamp=on"
> ...
> child process was terminated by signal 6: Aborted
> initdb: removing data directory "data"
> ```
> 
> Back-trace I got is shown in [1].
> 
> IIUC the crash was caused at TransactionIdSetCommitTs(), and the primal reason was that
> commit_ts module tried to store the bootstrap transaction.
> 
> In the first place I'm not sure we want to fix this because this happens only for
> the debug mode... but if needed, the easiest way is not to activate the commit_ts
> in the bootstrap mode. I think this fix is enough because pg_last_committed_xact()
> and TransactionIdGetCommitTsData() won't seek the un-normal xid.
> Attached patch was created based on the idea.

Yes, this was previously reported [0] but nothing was done about it.  We 
just need to find some place to "do nothing" in bootstrap mode to avoid 
the crash.  Your patch seems ok to me for that.


[0]: 
https://www.postgresql.org/message-id/[email protected]







view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: initdb -c "track_commit_timestamp=on" crashes in case of debug build
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox