"Dhaval Shah" <dhaval(dot)shah(dot)m(at)gmail(dot)com> writes:
> What am I doing wrong?
Lying to the server. If you don't have the requested file, return
failure, don't invent something. There are a number of cases where
the recovery process asks for files that are quite likely not to exist.
> If I indicate that I do not have the concerned file by returning error
> code 1, I get the following error in the log:
This may indicate that you have an incomplete backup :-(. It's hard to
tell from this much info though. What is in pg_control (use
pg_controldata to dump) and what is in the backup_label file (that's
plain text)? What WAL segment files do you actually have?
regards, tom lane