I am using pgBarman for PITR recovery. Now it's a bit of a crisis, because the Barman backup and the WAL archive seems like it cannot be recovered. We're running PostgreSQL 9.3.6 and latest stable Barman.
I ran the following command:
$ barman recover --target-time "2015-09-03 10:00:00.000" ke 20150501T200001 /tmp/ke-recovery
Leaving us with /tmp/ke-recovery, a folder we can start once we change the path names in postgresql.conf.
It then starts with the recovery of the WAL files from barman_xlog/ but then fails in about half an hour due to one of the WAL files are missing.
We assume this is because of an rsync "gone bad" from the master to the Barman box, and it was not noticed. It means we have almost all WAL files, but at least one is missing.
How can we "force" PostgreSQL to continue with the recovery (even at the potential loss of some data)? Perhaps by using pg_resetxlog ?
archive_command
you were using and the script, if any, that it called. This should not happen. If copying the WAL segment fails, PostgreSQL will retry until it succeeds. The only way I've seen this happen is with buggy archive scripts, or with sysadmin action like "cleaning" up WAL archives to free space. Unfortunately, you can't really just force PostgreSQL to continue recovery after a missing WAL segment, not without major work. Consider postgresql.org/support/professional_support . (Note that I work for one of the listed companies)