Re: pg_resetwal: refuse to run when backup_label exists

From: Tình Trần <tranvantinhnbk(at)gmail(dot)com>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, David Steele <david(at)pgbackrest(dot)org>
Subject: Re: pg_resetwal: refuse to run when backup_label exists
Date: 2026-10-11 08:17:23
Message-ID: CAEPgAbF8Q2FcoekyvF35mtAXzXjtnTh2q=UDMdPXxjAp7dqzQA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Shihao,

Thanks for checking this manually. That makes
sense—the early check and consistency with the postmaster.pid

I have no further comments on this point.

Regards,
Tinh

Vào CN, 11 thg 10, 2026 vào lúc 09:32 shihao zhong <zhong950419(at)gmail(dot)com>
đã viết:

> i Tinh,
>
> Thanks for testing.
>
> > One possible test enhancement would be to assert that pg_control,
> > the WAL files, and backup_label remain unchanged after each refusal.
>
> I would leave that out. The check runs before pg_resetwal reads
> pg_control, right after the postmaster.pid check, so nothing has been
> written at that point. The postmaster.pid refusal has no such test
> either. I did check by hand, and all three are unchanged after each
> refusal.
>
> Thanks,
> Shihao
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2026-10-11 09:36:41 Re: Proposal: Conflict log history table for Logical Replication
Previous Message Rahul 2026-10-11 07:46:44 Re: Wrong LSN in WAL decoding error messages