Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DE7D59FB75F for ; Fri, 29 Jun 2007 13:22:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 16719-10 for ; Fri, 29 Jun 2007 13:22:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id CE4E79FB7C5 for ; Fri, 29 Jun 2007 13:22:04 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Fri, 29 Jun 2007 11:22:03 -0500 Message-Id: <4684EB4A.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Date: Fri, 29 Jun 2007 11:21:47 -0500 From: "Kevin Grittner" To: "Simon Riggs" , "Tom Lane" Cc: "George Wilk" , Subject: Re: missing history file References: <008401c7ba44$5efa4170$0d7ba8c0@ellacoya.com> <1183124513.3589.104.camel@silverbirch.site><1183124513.3589.104.camel@silverbirch.site> <12838.1183128750@sss.pgh.pa.us> In-Reply-To: <12838.1183128750@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/303 X-Sequence-Number: 25971 >>> On Fri, Jun 29, 2007 at 9:52 AM, in message <12838.1183128750@sss.pgh.= pa.us>, Tom Lane wrote:=20 > "Simon Riggs" writes: >> Just ignore 00000001. Recovery will work fine even if absent. Don't >> ignore all history files though, just that one. Hmmm, come to think of >> it, why is it requesting it at all? We should just skip that request. >=20 > No, because then people would misdesign their recovery scripts to not > be able to deal with not finding a history file. As things are, they > will certainly be exposed to that case in any testing they do. If we > optimize this call away, then they won't see the case until they're in > very deep doo-doo. =20 We certainly were exposed to the case. We weren't able to turn up any documenation on it, so we added these lines to our recovery script: =20 if [[ $1 =3D=3D *.history ]] ; then exit 1 fi =20 Our warm standbys have apparently been working fine since. =20 Is there documentation of this that we missed? =20 Are our warm standby databases useful at this point, or have we wandered into very deeep doo-doo already? =20 Based on Simon's email, I went and modified one line of our script. I'll paste the current form below my "signature". Please let me know if we're off base. =20 -Kevin =20 #! /bin/bash # Pick out county name from the back of the path. # The value of $PWD will be: /var/pgsql/data/county//data countyName=3D`dirname $PWD` countyName=3D`basename $countyName` while [ ! -f /var/pgsql/data/county/$countyName/wal-files/$1.gz \ -a ! -f /var/pgsql/data/county/$countyName/DONE \ -o -f /var/pgsql/data/county/$countyName/wal-files/rsync-in-progress ] do if [ $1 =3D=3D 00000001.history ] ; then exit 1 fi sleep 10 # /* wait for ~10 sec */ done gunzip < /var/pgsql/data/county/$countyName/wal-files/$1.gz > "$2"