Thank you all for the comments. I have tried to address all the comments. I am not responding to each of them here. Based on the discussion above, I have retained the logic as mentioned by Shlok to compare active origins against max_active_replication_origins.
Attaching v11 with all comments addressed. regards, Ajin Cherian Fujitsu Australia
v11-0001-Preserve-subscription-OIDs-during-pg_upgrade.patch
Description: Binary data
v11-0002-Preserve-replication-origin-OIDs-during-pg_upgra.patch
Description: Binary data
