I assume you synchronous streaming replication, but have you looked at asynchronous replication just using WAL files? You could have your standby server lag behind by a fixed amount and maybe then you wouldn't have to delete on failover. Without more details, that's the best I can offer. --