PostgreSQL WAL recovery not working due to missing WAL 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 ?
I've been kicking PostgreSQL backup around the last couple of weeks, because of a new job, and I find the implementation of PostgreSQL's backup quite hard to grasp.

What I have learned however, is that the a missing WAL file is the worst situation you can have. A missing WAL file will not allow you to continue your restore past the missing file, because the PostgreSQL database relies on the WAL file to be ACID.

You could try to retrieve some of the information from the non-restored WAL files, but you wouldn't have any guarantee, that the resulting database/instance is consistent.