On Thu, Jun 11, 2026 at 11:58 AM Kyotaro Horiguchi <[email protected]> wrote: > I wonder whether we need to disable the startup progress timeout in > EnableStandbyMode() in the first place, if the intention is only to > suppress progress reporting during WAL replay on a standby.
There can be cases where WAL replay starts with StandbyMode == false and EnableStandbyMode() is called later during WAL replay. For example, *as far as I remember correctly*, that might happen when starting with standby.signal but without backup_label. In such cases, we would still want EnableStandbyMode() to disable the timeout. > Wouldn't it be simpler to handle the standby case at the existing > check, like this? > > if (!StandbyMode) > begin_startup_progress_phase(); > + else > + disable_startup_progress_timeout(); I thought the same at first, too. But I just thought the timeout should not be enabled even while reading the first WAL record, so I placed the check before reading the first record. Regards, -- Fujii Masao
