Re: pg_resetwal: refuse to run when backup_label exists

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Tình Trần <tranvantinhnbk(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 02:32:20
Message-ID: CAGRkXqQ7D9zRONZdQTV3QudzOL=1g7hBtGv3E+Gs+aQ=bhDL2Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 shihao zhong 2026-10-11 02:38:56 Re: examine_variable ignored CollateExpr
Previous Message shihao zhong 2026-10-11 02:17:35 Re: Assert failure in find_var_for_subquery_tle