Disable startup progress timeout during standby WAL replay
Disable startup progress timeout during standby WAL replay
Hi,
While working on a patch discussed in [1], I looked into how
log_startup_progress_interval behaves during recovery. During that
investigation, I noticed the following comment in
EnableStandbyMode():
/*
* To avoid server log bloat, we don't report recovery progress in a
* standby as it will always be in recovery unless promoted. We disable
* startup progress timeout in standby mode to avoid calling
* startup_progress_timeout_handler() unnecessarily.
*/
So in standby mode, we intentionally suppress recovery progress
logging during WAL replay, because otherwise a standby could emit
progress messages indefinitely until promotion.
However, some startup operations executed afterward, such as
ResetUnloggedRelations(), can re-enable the timeout. As a result, the
startup progress timeout can remain active during standby WAL replay,
which contradicts the intent described in the comment above.
This does not seem to cause any user-visible issue, because standby
WAL replay does not emit recovery progress messages anyway. However,
the timeout still causes unnecessary periodic wakeups during
standby WAL replay.
The attached patch disables the startup progress timeout again just
before entering WAL replay in standby mode. This preserves progress
reporting for earlier startup operations while avoiding unnecessary
wakeups during standby replay. The patch also slightly clarifies the
documentation for log_startup_progress_interval.
I see this as a small cleanup/improvement for master rather than a bug
fix requiring backpatching, since there is no visible behavioral issue
for users.
Thought?
Regards,
[1] https://postgr.es/m/44c24dcf-5710-410f-b1b6-d10b315f3d51@postgrespro.ru
--
Fujii Masao
Re: Disable startup progress timeout during standby WAL replay
От:
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Дата:
Hello.
At Thu, 11 Jun 2026 09:13:45 +0900, Fujii Masao wrote in
> However, some startup operations executed afterward, such as
> ResetUnloggedRelations(), can re-enable the timeout. As a result, the
> startup progress timeout can remain active during standby WAL replay,
> which contradicts the intent described in the comment above.
Good catch.
> The attached patch disables the startup progress timeout again just
> before entering WAL replay in standby mode. This preserves progress
> reporting for earlier startup operations while avoiding unnecessary
> wakeups during standby replay. The patch also slightly clarifies the
> documentation for log_startup_progress_interval.
>
> I see this as a small cleanup/improvement for master rather than a bug
> fix requiring backpatching, since there is no visible behavioral issue
> for users.
I agree with that assessment.
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.
It seems to me that the decision is more closely related to entering
the WAL replay phase than to enabling standby mode itself. Also, the
patch adds another StandbyMode check shortly before an existing one.
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();
If the timeout is no longer disabled in EnableStandbyMode(), this
would keep progress reporting for earlier startup phases, while making
it clearer in the code that the timeout is disabled when entering WAL
replay in standby mode.
Regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Re: Disable startup progress timeout during standby WAL replay
От:
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Дата:
Hi, On Wed, Jun 10, 2026 at 5:14 PM Fujii Masao wrote: > > Hi, > > While working on a patch discussed in [1], I looked into how > log_startup_progress_interval behaves during recovery. During that > investigation, I noticed the following comment in > EnableStandbyMode(): > > /* > * To avoid server log bloat, we don't report recovery progress in a > * standby as it will always be in recovery unless promoted. We disable > * startup progress timeout in standby mode to avoid calling > * startup_progress_timeout_handler() unnecessarily. > */ > > So in standby mode, we intentionally suppress recovery progress > logging during WAL replay, because otherwise a standby could emit > progress messages indefinitely until promotion. > > However, some startup operations executed afterward, such as > ResetUnloggedRelations(), can re-enable the timeout. As a result, the > startup progress timeout can remain active during standby WAL replay, > which contradicts the intent described in the comment above. Nice catch! Discussion for another thread: I wish we had these progress reports emitted even for the startup process - to help with post-hoc analysis of the customer issues about failover, slow replay, WAL growth on the primary, etc. However, I agree the volume of log records could grow unboundedly on the replica over its lifetime, because the same timeout parameter is being used at different scales. On the primary, assuming startup times are slower, one wants to know the recovery rate. On replicas, we surely want to have this info, say, every 5 min (288 logs per day), 10 min (144 logs per day), or 20 min (72 logs per day). I prefer to NOT add a new GUC for this, but perhaps the same GUC log_startup_progress_interval could log at different scales on the primary versus the replica. -- Bharath Rupireddy Amazon Web Services: https://aws.amazon.com
Re: Disable startup progress timeout during standby WAL replay
От:
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Дата:
Hello. At Thu, 11 Jun 2026 13:39:22 +0900, Fujii Masao wrote in > On Thu, Jun 11, 2026 at 11:58 AM Kyotaro Horiguchi > 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. I see the point about the standby.signal case, where WAL replay may already be in progress when EnableStandbyMode() is reached. In fact, that example makes me think the opposite: it seems that EnableStandbyMode() only needs to disable the timeout in this particular case because replay has already started before it is called. The other call sites do not seem to share that property, and it looks to me as though the timeout could still be legitimately needed there until standby replay actually begins. That is the reason behind my earlier comment questioning whether EnableStandbyMode() is the right place to disable it. > > 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. Similarly, if the timeout should be disabled before reading the first WAL record, I wonder whether begin_startup_progress_phase() should also be called at the same point. That said, I agree that the proposed change should work as it is, and this is ultimately a trade-off against the size of the fix. So I do not object to this direction if others think it is the more practical approach. Regards, -- Kyotaro Horiguchi NTT Open Source Software Center
Re: Disable startup progress timeout during standby WAL replay
От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Tue, Jun 16, 2026 at 5:28 PM Kyotaro Horiguchi wrote: > I see the point about the standby.signal case, where WAL replay may > already be in progress when EnableStandbyMode() is reached. In fact, > that example makes me think the opposite: it seems that > EnableStandbyMode() only needs to disable the timeout in this > particular case because replay has already started before it is > called. > > The other call sites do not seem to share that property, and it looks > to me as though the timeout could still be legitimately needed there > until standby replay actually begins. That is the reason behind my > earlier comment questioning whether EnableStandbyMode() is the right > place to disable it. Maybe I'm missing your point... Could you clarify what change you are suggesting for EnableStandbyMode() itself? > Similarly, if the timeout should be disabled before reading the first > WAL record, I wonder whether begin_startup_progress_phase() should > also be called at the same point. begin_startup_progress_phase() is currently called at the same point where we emit the "redo starts at ..." log message, which seems like a natural and consistent boundary for WAL replay progress reporting. So it seems better not to change where begin_startup_progress_phase() is called. On second thought, for disable_startup_progress_timeout(), calling it at the same place as begin_startup_progress_phase(), or before reading the first WAL record, seems effectively equivalent from the perspective of user-visible WAL replay progress logging in standby mode. The practical difference, as far as I can see, is only whether the startup progress timeout can still fire while reading the first WAL record. Reading that first record can potentially take some time, for example while waiting for WAL to arrive or restoring it from archive. If we want to suppress timeout activity during that period as well, it seems better to call disable_startup_progress_timeout() before reading the first WAL record. Regards, -- Fujii Masao
Re: Disable startup progress timeout during standby WAL replay
От:
Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Дата:
> Maybe I'm missing your point... Could you clarify what change you are > suggesting for EnableStandbyMode() itself? > > > > 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. > > Similarly, if the timeout should be disabled before reading the first > WAL record, I wonder whether begin_startup_progress_phase() should > also be called at the same point. I think disable_startup_progress_timeout() is needed both in EnableStandbyMode() and near the beginning of PerformWalRecovery(), because the two calls cover different orderings. When standby mode is enabled during InitWalRecovery(), it happens before ResetUnloggedRelations(). Since ResetUnloggedRelations() calls begin_startup_progress_phase(), it can re-enable the timeout after EnableStandbyMode() has disabled it. Therefore, if StandbyMode is already true on entry to PerformWalRecovery(), the timeout needs to be disabled again before reading the first WAL record. On the other hand, recovery can initially start with StandbyMode == false and later switch from crash recovery to archive/standby recovery after exhausting the WAL available in pg_wal. In that case, EnableStandbyMode() is called from ReadRecord(), and a WAL replay progress timeout may already be active. Therefore, the call in EnableStandbyMode() also needs to remain. This transition can potentially happen while trying to obtain the first replay record, before InRedo becomes true. Thus, making the call in EnableStandbyMode() conditional on replay having already started would not cover every case. Regarding the location of the new call, placing it before the first ReadRecord() looks correct to me. Reading the first record may involve restoring WAL from the archive or waiting for WAL to arrive. If the timeout was left active by ResetUnloggedRelations(), postponing the disable until after ReadRecord() would allow unnecessary periodic timeout activity throughout that wait. I do not think begin_startup_progress_phase() should be moved to the same location for symmetry. Its current placement after successfully obtaining the first record, near the "redo starts at ..." message, provides a natural boundary for the reported redo phase. Moving it before ReadRecord() would include time spent locating, restoring, or waiting for the first WAL record in the reported redo elapsed time. There is also no redo progress-reporting point inside that initial ReadRecord() call. Therefore, although the two disable calls look similar, they handle different transitions, and the code change in the patch looks correct to me. I have one minor suggestion for the documentation. The proposed wording: > On a standby server, however, it does not apply during WAL replay. might be slightly broader than the actual condition, because a server requested to become a standby can initially perform crash recovery with StandbyMode == false. Perhaps the following would map more directly to the implementation: "This setting is applied separately to each operation, such as WAL replay, syncing the data directory, and resetting unlogged relations. WAL replay progress is not reported while standby mode is active." With that minor documentation suggestion, the patch looks good to me. Best Regards, Nitin Jadhav Azure Database for PostgreSQL Microsoft
Re: Disable startup progress timeout during standby WAL replay
> On Oct 7, 2026, at 12:54, Nitin Jadhav wrote:
>
>> Maybe I'm missing your point... Could you clarify what change you are
>> suggesting for EnableStandbyMode() itself?
>>
>>>> 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.
>>
>> Similarly, if the timeout should be disabled before reading the first
>> WAL record, I wonder whether begin_startup_progress_phase() should
>> also be called at the same point.
>
> I think disable_startup_progress_timeout() is needed both in
> EnableStandbyMode() and near the beginning of PerformWalRecovery(),
> because the two calls cover different orderings. When standby mode is
> enabled during InitWalRecovery(), it happens before
> ResetUnloggedRelations(). Since ResetUnloggedRelations() calls
> begin_startup_progress_phase(), it can re-enable the timeout after
> EnableStandbyMode() has disabled it. Therefore, if StandbyMode is
> already true on entry to PerformWalRecovery(), the timeout needs to be
> disabled again before reading the first WAL record.
>
> On the other hand, recovery can initially start with StandbyMode ==
> false and later switch from crash recovery to archive/standby recovery
> after exhausting the WAL available in pg_wal. In that case,
> EnableStandbyMode() is called from ReadRecord(), and a WAL replay
> progress timeout may already be active. Therefore, the call in
> EnableStandbyMode() also needs to remain. This transition can
> potentially happen while trying to obtain the first replay record,
> before InRedo becomes true. Thus, making the call in
> EnableStandbyMode() conditional on replay having already started would
> not cover every case.
>
> Regarding the location of the new call, placing it before the first
> ReadRecord() looks correct to me. Reading the first record may involve
> restoring WAL from the archive or waiting for WAL to arrive. If the
> timeout was left active by ResetUnloggedRelations(), postponing the
> disable until after ReadRecord() would allow unnecessary periodic
> timeout activity throughout that wait.
>
> I do not think begin_startup_progress_phase() should be moved to the
> same location for symmetry. Its current placement after successfully
> obtaining the first record, near the "redo starts at ..." message,
> provides a natural boundary for the reported redo phase. Moving it
> before ReadRecord() would include time spent locating, restoring, or
> waiting for the first WAL record in the reported redo elapsed time.
> There is also no redo progress-reporting point inside that initial
> ReadRecord() call.
>
> Therefore, although the two disable calls look similar, they handle
> different transitions, and the code change in the patch looks correct
> to me.
>
> I have one minor suggestion for the documentation. The proposed wording:
>
>> On a standby server, however, it does not apply during WAL replay.
>
> might be slightly broader than the actual condition, because a server
> requested to become a standby can initially perform crash recovery
> with StandbyMode == false. Perhaps the following would map more
> directly to the implementation:
>
> "This setting is applied separately to each operation, such as WAL
> replay, syncing the data directory, and resetting unlogged relations.
> WAL replay progress is not reported while standby mode is active."
>
> With that minor documentation suggestion, the patch looks good to me.
>
> Best Regards,
> Nitin Jadhav
> Azure Database for PostgreSQL
> Microsoft
>
>
Hi!
Thanks for the patch. The problem is real, and I agree with Fujii's
analysis and Nitin's: the fix is correct, the placement is right, and
the call in EnableStandbyMode() still needs to stay.
I built master with and without the patch, with a temporary write() in
startup_progress_timeout_handler() to count firings, and
the timer re-armed by ResetUnloggedRelations() did keep firing for
the standby's whole lifetime, and the patch stops it.
I also checked the crash-recovery-first path (a crashed primary
restarted with standby.signal, no backup_label). There redo progress is
reported during the crash recovery part, and the timer is still running
when ReadRecord() calls EnableStandbyMode(). So the existing call in
EnableStandbyMode() is still needed; the new call only covers the case
where StandbyMode was already true when PerformWalRecovery() started.
Two non-blocking suggestions, no new patch needed for them:
- The comment says "earlier startup phases executed afterward", which
contradicts itself, and EnableStandbyMode() disables the timer, not
the logging (the !StandbyMode checks do that). Maybe:
EnableStandbyMode() disabled the startup progress timeout, but
startup operations performed since then, such as
ResetUnloggedRelations(), may have re-enabled it. Disable it again,
since recovery progress is not reported in standby mode.
- The doc sentence "On a standby server, however, it does not apply
during WAL replay" (and Nitin's "while standby mode is active") is
slightly off for the standby.signal-without-backup_label case: the
server logs "entering standby mode" and then still emits "redo in
progress" during the crash recovery part, because StandbyMode only
becomes true when ReadRecord() switches over. The exception only ever
adds messages and never hides any, so maybe a simple sentence is
safest, like:
"Progress of WAL replay is not reported on a standby
server."
Separately, while testing the conflict path I found a real bug next to
this one, and I'm attaching a small patch for it.
ResolveRecoveryConflictWithLock() and
ResolveRecoveryConflictWithBufferPin() both end with
disable_all_timeouts(false), under the assumption that the startup
process has no other timeouts. That stopped being true in PG 15, when
STARTUP_PROGRESS_TIMEOUT was added. So a single recovery conflict
cancels the progress timeout, and "redo in progress" goes quiet for the
rest of the redo, even though redo keeps going.
I reproduced it with PITR (recovery.signal, hot_standby=on): without a conflict
I got 24 messages of redo; with one lock conflict 7 messages, then silence
only. Nothing is lost but the log messages, so an admin
watching recovery might well think it is stuck. The attached patch
cancels only the two timeouts those functions enable; with it the same
run gives 24 messages.
That one is a separate and pre-existing: probably wants a backpatch
to 15. I exercised the lock-conflict path; the buffer-pin path is the
same pattern but I only read it, not ran it.
Regards,
Aidar Imamov
Re: Disable startup progress timeout during standby WAL replay
> On Oct 15, 2026, at 16:26, Aidar Imamov wrote: > >> On Oct 7, 2026, at 12:54, Nitin Jadhav wrote: >> >>> Maybe I'm missing your point... Could you clarify what change you are >>> suggesting for EnableStandbyMode() itself? >>> >>>>> 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. >>> >>> Similarly, if the timeout should be disabled before reading the first >>> WAL record, I wonder whether begin_startup_progress_phase() should >>> also be called at the same point. >> >> I think disable_startup_progress_timeout() is needed both in >> EnableStandbyMode() and near the beginning of PerformWalRecovery(), >> because the two calls cover different orderings. When standby mode is >> enabled during InitWalRecovery(), it happens before >> ResetUnloggedRelations(). Since ResetUnloggedRelations() calls >> begin_startup_progress_phase(), it can re-enable the timeout after >> EnableStandbyMode() has disabled it. Therefore, if StandbyMode is >> already true on entry to PerformWalRecovery(), the timeout needs to be >> disabled again before reading the first WAL record. >> >> On the other hand, recovery can initially start with StandbyMode == >> false and later switch from crash recovery to archive/standby recovery >> after exhausting the WAL available in pg_wal. In that case, >> EnableStandbyMode() is called from ReadRecord(), and a WAL replay >> progress timeout may already be active. Therefore, the call in >> EnableStandbyMode() also needs to remain. This transition can >> potentially happen while trying to obtain the first replay record, >> before InRedo becomes true. Thus, making the call in >> EnableStandbyMode() conditional on replay having already started would >> not cover every case. >> >> Regarding the location of the new call, placing it before the first >> ReadRecord() looks correct to me. Reading the first record may involve >> restoring WAL from the archive or waiting for WAL to arrive. If the >> timeout was left active by ResetUnloggedRelations(), postponing the >> disable until after ReadRecord() would allow unnecessary periodic >> timeout activity throughout that wait. >> >> I do not think begin_startup_progress_phase() should be moved to the >> same location for symmetry. Its current placement after successfully >> obtaining the first record, near the "redo starts at ..." message, >> provides a natural boundary for the reported redo phase. Moving it >> before ReadRecord() would include time spent locating, restoring, or >> waiting for the first WAL record in the reported redo elapsed time. >> There is also no redo progress-reporting point inside that initial >> ReadRecord() call. >> >> Therefore, although the two disable calls look similar, they handle >> different transitions, and the code change in the patch looks correct >> to me. >> >> I have one minor suggestion for the documentation. The proposed wording: >> >>> On a standby server, however, it does not apply during WAL replay. >> >> might be slightly broader than the actual condition, because a server >> requested to become a standby can initially perform crash recovery >> with StandbyMode == false. Perhaps the following would map more >> directly to the implementation: >> >> "This setting is applied separately to each operation, such as WAL >> replay, syncing the data directory, and resetting unlogged relations. >> WAL replay progress is not reported while standby mode is active." >> >> With that minor documentation suggestion, the patch looks good to me. >> >> Best Regards, >> Nitin Jadhav >> Azure Database for PostgreSQL >> Microsoft >> >> > > Hi! > > Thanks for the patch. The problem is real, and I agree with Fujii's > analysis and Nitin's: the fix is correct, the placement is right, and > the call in EnableStandbyMode() still needs to stay. > > I built master with and without the patch, with a temporary write() in > startup_progress_timeout_handler() to count firings, and > the timer re-armed by ResetUnloggedRelations() did keep firing for > the standby's whole lifetime, and the patch stops it. > > I also checked the crash-recovery-first path (a crashed primary > restarted with standby.signal, no backup_label). There redo progress is > reported during the crash recovery part, and the timer is still running > when ReadRecord() calls EnableStandbyMode(). So the existing call in > EnableStandbyMode() is still needed; the new call only covers the case > where StandbyMode was already true when PerformWalRecovery() started. > > Two non-blocking suggestions, no new patch needed for them: > > - The comment says "earlier startup phases executed afterward", which > contradicts itself, and EnableStandbyMode() disables the timer, not > the logging (the !StandbyMode checks do that). Maybe: > > EnableStandbyMode() disabled the startup progress timeout, but > startup operations performed since then, such as > ResetUnloggedRelations(), may have re-enabled it. Disable it again, > since recovery progress is not reported in standby mode. > > - The doc sentence "On a standby server, however, it does not apply > during WAL replay" (and Nitin's "while standby mode is active") is > slightly off for the standby.signal-without-backup_label case: the > server logs "entering standby mode" and then still emits "redo in > progress" during the crash recovery part, because StandbyMode only > becomes true when ReadRecord() switches over. The exception only ever > adds messages and never hides any, so maybe a simple sentence is > safest, like: > "Progress of WAL replay is not reported on a standby > server." > > Separately, while testing the conflict path I found a real bug next to > this one, and I'm attaching a small patch for it. > > ResolveRecoveryConflictWithLock() and > ResolveRecoveryConflictWithBufferPin() both end with > disable_all_timeouts(false), under the assumption that the startup > process has no other timeouts. That stopped being true in PG 15, when > STARTUP_PROGRESS_TIMEOUT was added. So a single recovery conflict > cancels the progress timeout, and "redo in progress" goes quiet for the > rest of the redo, even though redo keeps going. > > I reproduced it with PITR (recovery.signal, hot_standby=on): without a conflict > I got 24 messages of redo; with one lock conflict 7 messages, then silence > only. Nothing is lost but the log messages, so an admin > watching recovery might well think it is stuck. The attached patch > cancels only the two timeouts those functions enable; with it the same > run gives 24 messages. > > That one is a separate and pre-existing: probably wants a backpatch > to 15. I exercised the lock-conflict path; the buffer-pin path is the > same pattern but I only read it, not ran it. > > Regards, > Aidar Imamov > > <0001-Fix-recovery-conflict-canceling-the-startup-progress.patch> A small clarification about the v2 I just attached. It merges your v1 with my extra hunk into a single patch. The reason is purely the commitfest bot: if I upload two patches, it tends to show only the latest one and the original patch can get lost in the pipeline. Keeping everything in one patch lets the bot and reviewers see the whole picture in one place, and my hunk does not overlap or hide yours. That said, I am not sure this is the right shape. The extra hunk fixes a separate and pre-existing thing, and it probably wants its own thread and a backpatch to 15 if it worths. So bundling it into this thread may be the wrong move. I did it only so the bot does not lose track of things. If you or anyone else thinks the two should live apart, just say so and I will split them: your v1 stays as is, and I will move the disable_all_timeouts() fix to a new thread. Regards, Aidar Imamov
Re: Disable startup progress timeout during standby WAL replay
От:
Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Дата:
Hi Aidar, Thanks for testing both recovery paths and confirming the behavior. > That said, I am not sure this is the right shape. The extra hunk fixes > a separate and pre-existing thing, and it probably wants its own thread and > a backpatch to 15 if it worths. So bundling it into this thread may be the wrong > move. I did it only so the bot does not lose track of things. Nice catch on the disable_all_timeouts(false) issue. It appears to be independent of the standby timeout cleanup discussed in this thread and has different backpatching considerations. > If you or anyone else thinks the two should live apart, just say so and > I will split them: your v1 stays as is, and I will move the > disable_all_timeouts() fix to a new thread. +1 for splitting them. I suggest keeping Fujii-san’s standby timeout fix in this thread and moving the recovery-conflict issue to a separate thread and patch. That should allow the two changes to be reviewed, tested, and considered for backpatching independently. I have not reviewed the recovery-conflict patch in detail yet, but I would be happy to look at it separately once it is posted in its own thread. Best Regards, Nitin Jadhav Microsoft
Re: Disable startup progress timeout during standby WAL replay
Hi,
+1 for splitting them. I suggest keeping Fujii-san’s standby timeout
fix in this thread and moving the recovery-conflict issue to a
separate thread and patch. That should allow the two changes to be
reviewed, tested, and considered for backpatching independently.
I moved it out of this thread. It now has its own thread and CF entry:
+1, keeping it apart means this thread stays focused on Fujii's change,
and the other fix can get proper review plus a backpatch discussion of
its own.
I've re-attached Fujii's v1 patch to this message.
So the CF bot reports the correct status in the UI.
Nothing else changed in the patch from my side.
Regards,
Aidar Imamov
Re: Disable startup progress timeout during standby WAL replay
On Mon, Oct 26, 2026 at 10:41 PM Aidar Imamov wrote: > I've re-attached Fujii's v1 patch to this message. > So the CF bot reports the correct status in the UI. > Nothing else changed in the patch from my side. Thanks! Attached are the updated patches. 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. 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. Regards, -- Fujii Masao