From gwilk@ellacoya.com Fri Jun 29 11:55:34 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 990F69FB518 for ; Fri, 29 Jun 2007 08:55:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 01028-06 for ; Fri, 29 Jun 2007 08:55:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail02.ellacoya.com (67-135-29-172.dia.static.qwest.net [67.135.29.172]) by postgresql.org (Postfix) with ESMTP id 6625C9FB4FA for ; Fri, 29 Jun 2007 08:55:24 -0300 (ADT) Received: from YZANGXP ([192.168.123.13]) by mail02.ellacoya.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 29 Jun 2007 07:55:23 -0400 From: "George Wilk" To: Subject: missing history file Date: Fri, 29 Jun 2007 07:55:21 -0400 Message-ID: <008401c7ba44$5efa4170$0d7ba8c0@ellacoya.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0085_01C7BA22.D7E8A170" X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ace6RF7WCss5CftAQHmCVtd17KHvIA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-OriginalArrivalTime: 29 Jun 2007 11:55:23.0973 (UTC) FILETIME=[604FBF50:01C7BA44] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.000.1021-15266.003 X-TM-AS-Result: No--7.880800-4.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/296 X-Sequence-Number: 25964 This is a multi-part message in MIME format. ------=_NextPart_000_0085_01C7BA22.D7E8A170 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit My warm standby server is looking for a history file when booting up. It is looking for 00000001.history file to be exact. Since my *live* server doesn't produce such file, I create an empty 00000001.history file in the archive directory and that seems to satisfy this requirement allowing the standby server to come up in the recovery mode. It would be nice to know though how such file is created. I know that the *live* server creates *.backup file as a result of pg_stop_backup() command and this file is accurately archived on the standby server. Should I be renaming this file, or is there some other mechanism to tell my standby server what the history file is? Thanks in advance, ~george ------=_NextPart_000_0085_01C7BA22.D7E8A170 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

My warm standby server is looking for a history file = when booting up.  It is looking for 00000001.history file to be = exact.  Since my *live* server = doesn’t produce such file, I create an empty 00000001.history file in the = archive directory and that seems to satisfy this requirement allowing the = standby server to come up in the recovery mode.  =

 

It would be nice to know though how such file is created.  I know that the *live* server creates *.backup file as a result of pg_stop_backup() command and = this file is accurately archived on the standby server.  Should I be = renaming this file, or is there some other mechanism to tell my standby server = what the history file is?

 

Thanks in advance,

~george

------=_NextPart_000_0085_01C7BA22.D7E8A170-- From simon@2ndquadrant.com Fri Jun 29 13:46:00 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DED869FB933 for ; Fri, 29 Jun 2007 10:46:00 -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 93872-07 for ; Fri, 29 Jun 2007 10:45:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 170869FB849 for ; Fri, 29 Jun 2007 10:45:56 -0300 (ADT) thread-index: Ace6U9ouyv0qrnpaSt2J+iC0obbFmQ== Received: from [172.24.32.50] ([62.232.55.118]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 29 Jun 2007 09:46:10 -0400 Subject: Re: missing history file Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073 From: "Simon Riggs" To: "George Wilk" Cc: In-Reply-To: <008401c7ba44$5efa4170$0d7ba8c0@ellacoya.com> References: <008401c7ba44$5efa4170$0d7ba8c0@ellacoya.com> Content-Type: text/plain; charset="utf-8" Date: Fri, 29 Jun 2007 14:41:53 +0100 Message-ID: <1183124513.3589.104.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 29 Jun 2007 13:46:10.0515 (UTC) FILETIME=[D9F59230:01C7BA53] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/297 X-Sequence-Number: 25965 On Fri, 2007-06-29 at 07:55 -0400, George Wilk wrote: > My warm standby server is looking for a history file when booting up. > It is looking for 00000001.history file to be exact.=20 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. > Since my *live* server doesn=E2=80=99t produce such file, I create an em= pty > 00000001.history file in the archive directory and that seems to > satisfy this requirement allowing the standby server to come up in the > recovery mode. =20 Well, that should at least generate a message that says "history file empty, using targetTLI". > It would be nice to know though how such file is created. I know that > the *live* server creates *.backup file as a result of > pg_stop_backup() command and this file is accurately archived on the > standby server. Should I be renaming this file, or is there some > other mechanism to tell my standby server what the history file is? The timeline history file is only required when you do a recovery of a system that has itself already undergone a PITR. Have a look at pg_standby, accessible via CVS in contrib/pg_standby. --=20 Simon Riggs =20 EnterpriseDB http://www.enterprisedb.com From gwilk@ellacoya.com Fri Jun 29 13:57:39 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id F1E439FC2A8 for ; Fri, 29 Jun 2007 10:57:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 58993-02 for ; Fri, 29 Jun 2007 10:57:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail02.ellacoya.com (67-135-29-172.dia.static.qwest.net [67.135.29.172]) by postgresql.org (Postfix) with ESMTP id 07EF39FC279 for ; Fri, 29 Jun 2007 10:57:29 -0300 (ADT) Received: from YZANGXP ([192.168.123.13]) by mail02.ellacoya.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 29 Jun 2007 09:57:28 -0400 From: "George Wilk" To: "'Simon Riggs'" Cc: Subject: Re: missing history file Date: Fri, 29 Jun 2007 09:57:25 -0400 Message-ID: <00af01c7ba55$6c96b0f0$0d7ba8c0@ellacoya.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1183124513.3589.104.camel@silverbirch.site> Thread-Index: Ace6U9ouyv0qrnpaSt2J+iC0obbFmQAANqmA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-OriginalArrivalTime: 29 Jun 2007 13:57:28.0568 (UTC) FILETIME=[6E1C3F80:01C7BA55] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.000.1021-15266.003 X-TM-AS-Result: No--17.151500-4.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/299 X-Sequence-Number: 25967 Thanks, Simon. I will ignore the request for the history file in my recovery_command from now on. Is the timeline history file needed when trying to put the standby server back into the recovery mode, after it assumed the primary role? (i.e. standby server goes *live*, and is subsequently restarted in the recovery mode). Is this a valid scenario at all, or should I be taking a new base backup and starting over? I am running into some problems when attempting this. ~george -----Original Message----- From: Simon Riggs [mailto:simon@2ndquadrant.com] Sent: Friday, June 29, 2007 9:42 AM To: George Wilk Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] missing history file On Fri, 2007-06-29 at 07:55 -0400, George Wilk wrote: > My warm standby server is looking for a history file when booting up. > It is looking for 00000001.history file to be exact. 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. > Since my *live* server doesn't produce such file, I create an empty > 00000001.history file in the archive directory and that seems to > satisfy this requirement allowing the standby server to come up in the > recovery mode. Well, that should at least generate a message that says "history file empty, using targetTLI". > It would be nice to know though how such file is created. I know that > the *live* server creates *.backup file as a result of > pg_stop_backup() command and this file is accurately archived on the > standby server. Should I be renaming this file, or is there some > other mechanism to tell my standby server what the history file is? The timeline history file is only required when you do a recovery of a system that has itself already undergone a PITR. Have a look at pg_standby, accessible via CVS in contrib/pg_standby. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com From simon@2ndquadrant.com Fri Jun 29 14:04:12 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 3022B9FB554 for ; Fri, 29 Jun 2007 11:04:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 20914-09 for ; Fri, 29 Jun 2007 11:03:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 0E2529FB3FD for ; Fri, 29 Jun 2007 11:03:58 -0300 (ADT) thread-index: Ace6Vl7Tar7trKtfStySgu5Gu7e9wA== Received: from [172.24.32.50] ([62.232.55.118]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 29 Jun 2007 10:04:11 -0400 Subject: Re: missing history file Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073 From: "Simon Riggs" To: "George Wilk" Cc: In-Reply-To: <00af01c7ba55$6c96b0f0$0d7ba8c0@ellacoya.com> References: <00af01c7ba55$6c96b0f0$0d7ba8c0@ellacoya.com> Content-Type: text/plain; charset="iso-8859-1" Date: Fri, 29 Jun 2007 14:59:55 +0100 Message-ID: <1183125595.3589.116.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Jun 2007 14:04:12.0359 (UTC) FILETIME=[5EC9DD70:01C7BA56] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/300 X-Sequence-Number: 25968 On Fri, 2007-06-29 at 09:57 -0400, George Wilk wrote: > Thanks, Simon. I will ignore the request for the history file in my > recovery_command from now on. > > Is the timeline history file needed when trying to put the standby server > back into the recovery mode, after it assumed the primary role? (i.e. > standby server goes *live*, and is subsequently restarted in the recovery > mode). No, not needed. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com From tgl@sss.pgh.pa.us Fri Jun 29 14:53:11 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 51D349FB45F for ; Fri, 29 Jun 2007 11:53:11 -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 70491-02 for ; Fri, 29 Jun 2007 11:53:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 63D0C9FB37F for ; Fri, 29 Jun 2007 11:53:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l5TEqU49012839; Fri, 29 Jun 2007 10:52:30 -0400 (EDT) To: "Simon Riggs" cc: "George Wilk" , pgsql-admin@postgresql.org Subject: Re: missing history file In-reply-to: <1183124513.3589.104.camel@silverbirch.site> References: <008401c7ba44$5efa4170$0d7ba8c0@ellacoya.com> <1183124513.3589.104.camel@silverbirch.site> Comments: In-reply-to "Simon Riggs" message dated "Fri, 29 Jun 2007 14:41:53 +0100" Date: Fri, 29 Jun 2007 10:52:30 -0400 Message-ID: <12838.1183128750@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/301 X-Sequence-Number: 25969 "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. 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. regards, tom lane From gwilk@ellacoya.com Fri Jun 29 15:22:12 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id F3F0E9FC2FB for ; Fri, 29 Jun 2007 12:22:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 26528-06 for ; Fri, 29 Jun 2007 12:22:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail02.ellacoya.com (67-135-29-172.dia.static.qwest.net [67.135.29.172]) by postgresql.org (Postfix) with ESMTP id E3D789FC328 for ; Fri, 29 Jun 2007 12:22:06 -0300 (ADT) Received: from YZANGXP ([192.168.123.13]) by mail02.ellacoya.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 29 Jun 2007 11:22:06 -0400 From: "George Wilk" To: Subject: Re: missing history file Date: Fri, 29 Jun 2007 11:22:03 -0400 Message-ID: <00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <12838.1183128750@sss.pgh.pa.us> Thread-Index: Ace6XUZyb1PY2+KwQFGxYdoLZsx+TwAA8lLQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-OriginalArrivalTime: 29 Jun 2007 15:22:06.0195 (UTC) FILETIME=[409CA430:01C7BA61] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.000.1021-15266.003 X-TM-AS-Result: No--8.267300-4.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/302 X-Sequence-Number: 25970 Tom, When and by what process is the history file being created? My standby server seems to be looking for it when put back in the recovery mode, after functioning as primary for a while. How should I handle missing history file in my script? Cheers, ~george -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Friday, June 29, 2007 10:53 AM To: Simon Riggs Cc: George Wilk; pgsql-admin@postgresql.org Subject: Re: [ADMIN] missing history file "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. 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. regards, tom lane From Kevin.Grittner@wicourts.gov Fri Jun 29 16:22:13 2007 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" From tgl@sss.pgh.pa.us Fri Jun 29 16:48:37 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 0F8DF9FBA28 for ; Fri, 29 Jun 2007 13:48:37 -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 25179-03 for ; Fri, 29 Jun 2007 13:48:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 57D7B9FB9E3 for ; Fri, 29 Jun 2007 13:48:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l5TGlxbC005333; Fri, 29 Jun 2007 12:47:59 -0400 (EDT) To: "George Wilk" cc: pgsql-admin@postgresql.org Subject: Re: missing history file In-reply-to: <00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com> References: <00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com> Comments: In-reply-to "George Wilk" message dated "Fri, 29 Jun 2007 11:22:03 -0400" Date: Fri, 29 Jun 2007 12:47:59 -0400 Message-ID: <5332.1183135679@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/304 X-Sequence-Number: 25972 "George Wilk" writes: > When and by what process is the history file being created? My standby > server seems to be looking for it when put back in the recovery mode, after > functioning as primary for a while. > How should I handle missing history file in my script? History files are only created when you do a PITR recovery that stops short of the end of WAL (ie, you gave it an explicit stopping point criterion). So basically they never appear except by manual intervention on the primary server. A standby script should probably handle requests for them by looking to see if they're available, and returning 'em if so, but not waiting if they are not. Offhand I would recommend the same strategy for any requested filename that's not a plain WAL segment file (ie, all hex digits). regards, tom lane From Kevin.Grittner@wicourts.gov Fri Jun 29 17:12:26 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 1B6789FC1D3 for ; Fri, 29 Jun 2007 14:12:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 77631-03 for ; Fri, 29 Jun 2007 14:12:20 -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 544359FB4C9 for ; Fri, 29 Jun 2007 14:12:21 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Fri, 29 Jun 2007 12:12:20 -0500 Message-Id: <4684F718.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Date: Fri, 29 Jun 2007 12:12:08 -0500 From: "Kevin Grittner" To: "George Wilk" ,"Tom Lane" Cc: Subject: Re: missing history file References: <00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com><00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com> <5332.1183135679@sss.pgh.pa.us> In-Reply-To: <5332.1183135679@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/306 X-Sequence-Number: 25974 >>> On Fri, Jun 29, 2007 at 11:47 AM, in message <5332.1183135679@sss.pgh.p= a.us>, Tom Lane wrote:=20 >=20 > History files are only created when you do a PITR recovery that stops > short of the end of WAL (ie, you gave it an explicit stopping point > criterion). So basically they never appear except by manual > intervention on the primary server. A standby script should probably > handle requests for them by looking to see if they're available, and > returning 'em if so, but not waiting if they are not. >=20 > Offhand I would recommend the same strategy for any requested filename > that's not a plain WAL segment file (ie, all hex digits). =20 I suspect that it's worth waiting for something like this, too?: =20 000000010000000A000000CF.0000E744.backup =20 From tgl@sss.pgh.pa.us Fri Jun 29 17:29:44 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 0320C9FB5CB for ; Fri, 29 Jun 2007 14:29:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 84056-01 for ; Fri, 29 Jun 2007 14:29:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 415B69FB40F for ; Fri, 29 Jun 2007 14:29:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l5THT6KT005751; Fri, 29 Jun 2007 13:29:06 -0400 (EDT) To: "Kevin Grittner" cc: "George Wilk" , pgsql-admin@postgresql.org Subject: Re: missing history file In-reply-to: <4684F718.EE98.0025.0@wicourts.gov> References: <00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com><00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com> <5332.1183135679@sss.pgh.pa.us> <4684F718.EE98.0025.0@wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Fri, 29 Jun 2007 12:12:08 -0500" Date: Fri, 29 Jun 2007 13:29:06 -0400 Message-ID: <5750.1183138146@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/307 X-Sequence-Number: 25975 "Kevin Grittner" writes: > Tom Lane wrote: >> Offhand I would recommend the same strategy for any requested filename >> that's not a plain WAL segment file (ie, all hex digits). > > I suspect that it's worth waiting for something like this, too?: > 000000010000000A000000CF.0000E744.backup No, I don't think so. AFAICS the slave server would only ask for one of those during its initial cold start from a base backup, and it'll be looking for the one that should have been generated at completion of that base backup. If it ain't there, it's unlikely to appear later. regards, tom lane From Kevin.Grittner@wicourts.gov Fri Jun 29 17:45:50 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 755F89FC394 for ; Fri, 29 Jun 2007 14:45:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 36470-04 for ; Fri, 29 Jun 2007 14:45:30 -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 678049FC245 for ; Fri, 29 Jun 2007 14:45:42 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Fri, 29 Jun 2007 12:45:41 -0500 Message-Id: <4684FEE7.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Date: Fri, 29 Jun 2007 12:45:27 -0500 From: "Kevin Grittner" To: "Tom Lane" Cc: "George Wilk" , Subject: Re: missing history file References: <00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com><00d201c7ba61$3f078540$0d7ba8c0@ellacoya.com> <5332.1183135679@sss.pgh.pa.us> <4684F718.EE98.0025.0@wicourts.gov><4684F718.EE98.0025.0@wicourts.gov> <5750.1183138146@sss.pgh.pa.us> In-Reply-To: <5750.1183138146@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/309 X-Sequence-Number: 25977 >>> On Fri, Jun 29, 2007 at 12:29 PM, in message <5750.1183138146@sss.pgh.p= a.us>, Tom Lane wrote:=20 > "Kevin Grittner" writes: >> Tom Lane wrote: >>> Offhand I would recommend the same strategy for any requested filename >>> that's not a plain WAL segment file (ie, all hex digits). >>=20 >> I suspect that it's worth waiting for something like this, too?: >> 000000010000000A000000CF.0000E744.backup >=20 > No, I don't think so. AFAICS the slave server would only ask for one > of those during its initial cold start from a base backup, and it'll be > looking for the one that should have been generated at completion of > that base backup. If it ain't there, it's unlikely to appear later. Fair enough. It would have saved us some time if this was mentioned in the warm standby documentation. I'll try to put a doc patch together. =20 -Kevin =20 From simon@2ndquadrant.com Mon Jul 2 09:40:01 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 365099FB94B for ; Mon, 2 Jul 2007 06:40:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52882-09 for ; Mon, 2 Jul 2007 06:39:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 07FEC9FB948 for ; Mon, 2 Jul 2007 06:39:57 -0300 (ADT) thread-index: Ace8jPyAZ924jx6OTfKGkaRf2zlrzg== Received: from [172.24.32.50] ([62.232.55.118]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 2 Jul 2007 05:40:11 -0400 Content-Class: urn:content-classes:message Subject: Re: missing history file Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073 From: "Simon Riggs" To: "Tom Lane" Cc: "George Wilk" , In-Reply-To: <12838.1183128750@sss.pgh.pa.us> References: <008401c7ba44$5efa4170$0d7ba8c0@ellacoya.com> <1183124513.3589.104.camel@silverbirch.site> <12838.1183128750@sss.pgh.pa.us> Content-Type: text/plain; charset="iso-8859-1" Date: Mon, 02 Jul 2007 10:35:56 +0100 Message-ID: <1183368957.3589.160.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Jul 2007 09:40:11.0953 (UTC) FILETIME=[FC68FA10:01C7BC8C] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/3 X-Sequence-Number: 25984 On Fri, 2007-06-29 at 10:52 -0400, Tom Lane wrote: > "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. > > 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. Main reason for suggesting this is that there is already code to optimize the call away in one place, but not in another, which seems strange either way. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com