Hi, It seems like the two functions ReplicationSlotsComputeRequiredLSN and ReplicationSlotsComputeLogicalRestartLSN more or less does the same thing which makes me optimize (saving 40 LOC) it as attached. I'm pretty much okay if it gets rejected on the grounds that it creates a lot of diff with the older versions and the new API may not look nicer, still I want to give it a try.
Thoughts? Regards, Bharath Rupireddy.
v1-0001-deduplicate-min-restart_lsn-calculation-code.patch
Description: Binary data