Re: A assert failure when initdb with track_commit_timestamp=on
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Andy Fan <zhihuifan1213@163.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-07-02T00:46:42Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Disable commit timestamps during bootstrap
- 8bca4476f9f9 13.22 landed
- b61ddcaf41cf 14.19 landed
- dcbbd43317c0 15.14 landed
- 7e7059abfd22 16.10 landed
- ae20c105f0b2 17.6 landed
- 29a4b63c6bc8 18.0 landed
- 5a6c39b6df33 19 (unreleased) landed
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