Re: Startup PANIC on standby promotion due to zero-filled WAL segment

From: Alena Vinter <dlaaren8(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Startup PANIC on standby promotion due to zero-filled WAL segment
Date: 2025-12-25 08:47:05
Message-ID: CAGWv16+9r8roFdReY1qV6rcFDi9UdzmjQc+GfKbdvHZMomCqCg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I like the idea of preventing promotion to avoid such failures -- it sounds
reasonable.

However, we still have the problem: if the standby is stopped with
non-replicated TLI 2, it will fail to start:
"FATAL: according to history file, WAL location Y belongs to timeline X,
but previous recovered WAL file came from timeline X+1".
This happens even if no promotion is attempted — just a plain restart of
the standby. So the issue isn’t only about when to allow promotion.

Regarding my proposed solution: could you clarify why it isn’t correct? I’d
appreciate more detail so I can address your concerns.

---
Alena Vinter

Attachment Content-Type Size
recovery_tli_switch_test_without_standby_promotion_replica.log text/x-log 3.2 KB
recovery_tli_switch_test_without_standby_promotion.pl application/x-perl 1.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2025-12-25 08:56:50 Re: index prefetching
Previous Message Dilip Kumar 2025-12-25 07:40:34 Re: Proposal: Conflict log history table for Logical Replication