X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A671011F602E for ; Fri, 28 Apr 2006 12:48:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 49678-04 for ; Fri, 28 Apr 2006 12:48:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1A90311F6004 for ; Fri, 28 Apr 2006 12:48:36 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3SFmY3e001443; Fri, 28 Apr 2006 11:48:34 -0400 (EDT) To: andy.shellam@mailnetwork.co.uk cc: pgsql-admin@postgresql.org Subject: Re: WAL recovery question - 0000001.history In-reply-to: <20060428152301.007F011F602A@postgresql.org> References: <20060428152301.007F011F602A@postgresql.org> Comments: In-reply-to "Andy Shellam" message dated "Fri, 28 Apr 2006 16:23:01 +0100" Date: Fri, 28 Apr 2006 11:48:34 -0400 Message-ID: <1442.1146239314@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/338 X-Sequence-Number: 21507 "Andy Shellam" 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