On 2021-Aug-24, Bossart, Nathan wrote:
> If moving RegisterSegmentBoundary() is sufficient to prevent the flush
> pointer from advancing before we register the boundary, I bet we could
> also remove the WAL writer nudge.
Can you elaborate on this? I'm not sure I see the connection.
> Another interesting thing I see is that the boundary stored in
> earliestSegBoundary is not necessarily the earliest one. It's just
> the first one that has been registered. I did this for simplicity for
> the .ready file fix, but I can see it causing problems here.
Hmm, is there really a problem here? Surely the flush point cannot go
past whatever has been written. If somebody is writing an earlier
section of WAL, then we cannot move the flush pointer to a later
position. So it doesn't matter if the earliest point we have registered
is the true earliest -- we only care for it to be the earliest that is
past the flush point.
--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/