the function RecoveryInProgress() in the function sql_utils/repmgr_wrapper_funcs.c:last_xlog_replay_timestamp()
and applied lag
called pg_blender
and replaced by GetLatestXTime() but this function cannot be called from external programs. Instead now we are using GetXLogReceiptTime() which tells us what was the last time we got a WAL record by streaming or file.