Hi Shihao,
On 9/27/26 19:13, shihao zhong wrote:
>
> On the pg_resetwal patch, one question before I write it. A restored backup
> is never cleanly shut down, so pg_resetwal already needs -f there. A
> backup_label check that -f overrides would only change the message. I'd
> rather refuse even with -f, like the postmaster.pid check, and make the user
> remove backup_label by hand. 058 would then need to remove backup_label
> before its pg_resetwal step.
I would definitely prefer to force the user to remove backup_label
before pg_resetwal will continue (even with -f). The presence of
backup_label indicates they are making a mistake by using pg_resetwal,
when they should probably be configuring recovery instead.
Regards,
-David