Re: WAL recovery question - 0000001.history - Mailing list pgsql-admin

From Tom Lane
Subject Re: WAL recovery question - 0000001.history
Date
Msg-id 1442.1146239314@sss.pgh.pa.us
Whole thread Raw
In response to WAL recovery question - 0000001.history  ("Andy Shellam" <andy.shellam@mailnetwork.co.uk>)
Responses Re: WAL recovery question - 0000001.history  (andy@andycc.net)
List pgsql-admin
"Andy Shellam" <andy.shellam@mailnetwork.co.uk> writes:
> Basically I've taken a dump of my live database directory (between
> pg_start_backup and pg_stop_backup) calls - shipped this to my standby, set
> up a recovery.conf file (which calls the rolling-WAL script).  This script
> is designed to wait until the log file arrives, or a flag file is set to
> return code 1 to postgres.

> However as soon as the recovery starts, the script is waiting for a file
> called 00000001.history, which will never arrive because it was never
> generated on the live box since the base backup was taken.

This is not a workable approach: your recovery script *will* be asked
for files that do not exist, and waiting for them to be supplied is not
always the right answer.  Supplying an empty file instead is definitely
the wrong answer.

You might be able to make it work by conditionalizing the behavior on
the format of the name being asked for.

            regards, tom lane

pgsql-admin by date:

Previous
From: "Andy Shellam"
Date:
Subject: Re: Backing up large databases
Next
From: "Benjamin Krajmalnik"
Date:
Subject: Re: New system recommendations