Re: A assert failure when initdb with track_commit_timestamp=on

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andy Fan <zhihuifan1213(at)163(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A assert failure when initdb with track_commit_timestamp=on
Date: 2025-07-02 00:46:42
Message-ID: aGSBcvlXY9FDkcsr@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-07-02 00:55:22 Re: [PATCH] Split varlena.c into varlena.c and bytea.c
Previous Message Andy Fan 2025-07-02 00:38:01 A assert failure when initdb with track_commit_timestamp=on