Hi, On 2021-06-17 18:13:57 -0700, Jeff Davis wrote: > On Wed, 2021-06-16 at 16:17 -0700, Andres Freund wrote: > > I think we should explicitly compute the current timeline before > > using > > ThisTimelineID. E.g. in StartReplication() call a new version of > > GetFlushRecPtr() that also returns the current timeline id. > > I think all we need to do is follow the pattern in IdentifySystem() by > calling: > > am_cascading_walsender = RecoveryInProgress(); > > first.
Yea, that sounds reasonable. I'm not a fan of hiding the timeline determination inside RecoveryInProgress(), particularly not when communicated via global variable. But that's not the fault of this patch. Greetings, Andres Freund