| From: | Fujii Masao <fujii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix checkpointer restartpoint assertion failure |
| Date: | 2026-09-02 05:36:23 |
| Message-ID: | E1x1de2-000000038VJ-102v@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix checkpointer restartpoint assertion failure
When recovery starts from a backup without a signal file, pg_subtrans
is not started at the beginning of recovery and remains unstarted
throughout recovery. However, previously, a restartpoint run by
the checkpointer during recovery nevertheless tried to truncate
pg_subtrans, triggering the assertion failure:
TRAP: failed Assert("TransactionIdIsValid(initial)")
This commit fixes this by tracking whether pg_subtrans has been
started during recovery, and have the checkpointer check this flag
before truncating pg_subtrans at restartpoints.
Backpatch to all supported versions.
Reported-by: Imran Zaheer <imran(dot)zhir(at)gmail(dot)com>
Author: Imran Zaheer <imran(dot)zhir(at)gmail(dot)com>
Author: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/CA+UBfamzfEReT0VOGRUW_=_AecCYQ-CNKLR_T4Q+YEmJAH3fdg@mail.gmail.com
Backpatch-through: 14
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c2c696c1a4827cde5fdaf8c8f03f9991d43ebfad
Modified Files
--------------
src/backend/access/transam/xlog.c | 7 ++++---
src/backend/access/transam/xlogrecovery.c | 26 ++++++++++++++++++++++++++
src/include/access/xlogrecovery.h | 8 ++++++++
3 files changed, 38 insertions(+), 3 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-09-02 05:36:36 | pgsql: Fix checkpointer restartpoint assertion failure |
| Previous Message | Michael Paquier | 2026-09-02 05:14:51 | pgsql: Apply some query jumbling to WAIT FOR LSN |