Hi Heikki, While diagnosing a "flake" in our CI, I came across this thread and the window that you closed in this commit.
There seems to be another window though in the same vicinity during promotion: right after the standby.signal is removed and before the control file is updated with minRecoveryPointTLI. Basically, it seems that the info that this server was being promoted is effectively lost if there is an unclean shutdown in this window. So, retrying the promotion won't help because standby.signal is gone and the server acts as a primary on restart (on the *old* timeline). This means that if we wanted to use this server to rewind the old primary, rewind would just say "no rewind required" and both servers would be divergent forever. I haven't had a chance to think through a solution yet, but just wanted to share the observation on this thread (demonstrated with a small fault injection test). Regards, Deep (Broadcom)
promotion-window.patch
Description: Binary data
