From: Michael Paquier <michael@paquier.xyz>
To: Andy Fan <zhihuifan1213@163.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: A assert failure when initdb with track_commit_timestamp=on
Date: Wed, 2 Jul 2025 09:46:42 +0900
Message-ID: <aGSBcvlXY9FDkcsr@paquier.xyz> (raw)
In-Reply-To: <87plejmnpy.fsf@163.com>
References: <87plejmnpy.fsf@163.com>
On Wed, Jul 02, 2025 at 12:38:01AM +0000, Andy Fan wrote:
> However this is not true in BootstrapMode, this failure is masked by
> default because TransactionTreeSetCommitTsData returns fast when
> track_commit_timestamp is off.
Agreed that there is no point in registering a commit timestamp in
the cases of a frozen and bootstrap XIDs. I would recommend to keep
the assertion in TransactionIdSetCommitTs(), though, that still looks
useful to me for the many callers of this routine, at least as a
sanity check.
I did not check, but usually we apply filters based on
IsBootstrapProcessingMode() for code paths that we do not want to
reach while in bootstrap mode. Could the same be done here?
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../aGSBcvlXY9FDkcsr@paquier.xyz/2-signature.asc)
download
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: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz, zhihuifan1213@163.com
Subject: Re: A assert failure when initdb with track_commit_timestamp=on
In-Reply-To: <aGSBcvlXY9FDkcsr@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox