In one aspect, a method includes merging a first consistency group (CG) with a second CG on a source side of a replication system and merging a third CG with a fourth CG on the target side of the replication system. The first CG and the third CG form a first replication pair (RP) and the second CG and the fourth CG form a second RP. The merging includes changing a replication policy of the first RP to be equal to a retention policy of the second RP, waiting for the first RP and the second RP to stop data transfer, terminating replication of the first RP after the data transfer stopped, updating the first RP and second RP at the source side, updating the first RP and second RP at the target side and resuming replication using the second RP.