Re: walsender.c comment with no context is hard to understand - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: walsender.c comment with no context is hard to understand
Date
Msg-id CAA4eK1JVrKjJvHiyVziDO8k9hwXEanHT8PVXzUVmNhrz9od32A@mail.gmail.com
Whole thread Raw
In response to Re: walsender.c comment with no context is hard to understand  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: walsender.c comment with no context is hard to understand
List pgsql-hackers
On Fri, Jun 28, 2024 at 6:30 PM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:
>
> On Fri, Jun 28, 2024 at 03:15:22PM +0530, Amit Kapila wrote:
> > On Fri, Jun 28, 2024 at 12:55 PM Peter Smith <smithpb2250@gmail.com> wrote:
> > >
> >
> > I don't know whether your assumption is correct. AFAICS, those two
> > lines should be together. Let us ee if Bertrand remembers anything?
> >
>
> IIRC the WalSndWaitForWal() call has been moved to ensure that we can determine
> the timeline accurately.
>

This part is understandable but I don't understand the part of the
comment (This is needed to determine am_cascading_walsender accurately
..) atop a call to WalSndWaitForWal(). The am_cascading_walsender is
determined based on the results of RecoveryInProgress(). Can the wait
for WAL by using WalSndWaitForWal() change the result of
RecoveryInProgress()?

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Slow catchup of 2PC (twophase) transactions on replica in LR
Next
From: David Rowley
Date:
Subject: Re: Use generation memory context for tuplestore.c