On 20/11/2026 08:43, Fujii Masao wrote:
In 0002, I clarified the code comment and added a note explaining that
a standby may report progress during initial crash recovery. The code
change itself is unchanged from v1.
LGTM. My AI reviewer says it's incomplete though.
begin_startup_progress_phase() has the same early return:
if (log_startup_progress_interval == 0)
return;
disable_startup_progress_timeout();
enable_startup_progress_timeout();
On a non-standby (crash recovery or PITR), suppose the interval is
reloaded to 0 after ResetUnloggedRelations() has started the timer. That
can happen while the first ReadRecord() waits on restore_command for
example. When redo starts, begin_startup_progress_phase() returns early
and the old timer is left running. "redo in progress" messages then keep
coming even though the user turned the feature off. And more
importantly, their elapsed time is wrong, because we skipped resetting
startup_progress_phase_start_time.
To fix, remove the early return from begin_startup_progress_phase().
That's enough because enable_startup_progress_timeout() already checks
for log_startup_progress_interval == 0.
While updating the patch, I found another minor issue.
If log_startup_progress_interval is changed to zero during initial
crash recovery, disable_startup_progress_timeout() skips stopping
the active timer when the server enters standby mode, leaving it to
fire unnecessarily.
Attached 0001 fixes this by removing the setting check from
the disable function. Since this is the minor issue, a master-only fix
might be sufficient. OTOH, backpatching also seems reasonable since
this is a bug. I'm currently leaning toward backpatching through v15.
LGTM.
- Heikki