Dear Dilip, Another idea is to call ReplicationSlotsComputeRequiredLSN() when at least one of the restart_lsn is updated, like attached. I feel this could reduce the computation bit more.
Best regards, Hayato Kuroda FUJITSU LIMITED
tmp.diffs
Description: tmp.diffs