Easiest thing to do is to keep the replica from seeing the file until it’s successfully transferred; i.e. 1. Transfer the file successfully first with a temporary extension: $ARCH_DIR/$WALFILE.swap 2. If successfully transferred then move it into place: mv $ARCH_DIR/$WALFILE.swap $ARCH_DIR/$WALFILE 3. Return status success/failure code back to primary
|