Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1D0DD631B0A for ; Thu, 25 Mar 2010 09:48:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 02180-05 for ; Thu, 25 Mar 2010 12:48:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og103.obsmtp.com (exprod7og103.obsmtp.com [64.18.2.159]) by mail.postgresql.org (Postfix) with SMTP id B678662F878 for ; Thu, 25 Mar 2010 09:48:33 -0300 (ADT) Received: from source ([209.85.219.211]) by exprod7ob103.postini.com ([64.18.6.12]) with SMTP ID DSNKS6tbn6L1GecNekjE81jFY08pv1PFPy5K@postini.com; Thu, 25 Mar 2010 05:48:33 PDT Received: by ewy3 with SMTP id 3so1259540ewy.26 for ; Thu, 25 Mar 2010 05:48:30 -0700 (PDT) Received: by 10.213.56.15 with SMTP id w15mr2711457ebg.95.1269521310579; Thu, 25 Mar 2010 05:48:30 -0700 (PDT) Received: from [192.168.1.117] (dsl-hkibrasgw2-ff67c300-165.dhcp.inet.fi [88.195.103.165]) by mx.google.com with ESMTPS id 16sm770880ewy.15.2010.03.25.05.48.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 25 Mar 2010 05:48:29 -0700 (PDT) Message-ID: <4BAB5B9B.80203@enterprisedb.com> Date: Thu, 25 Mar 2010 14:48:27 +0200 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Fujii Masao CC: Simon Riggs , Aidan Van Dyk , PostgreSQL-development Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL References: <3f0b79eb1002092105r21e009d3v468496058ba04392@mail.gmail.com> <20100211144204.GC14128@oak.highrise.ca> <4B743E7D.5070603@enterprisedb.com> <3f0b79eb1002180337t1fab1395ve3491256672af15f@mail.gmail.com> <4BA0B079.3050301@enterprisedb.com> <3f0b79eb1003180727g7877743eq81274e014fe70a49@mail.gmail.com> <1268988724.3556.3.camel@ebony> <4BA361E4.7020309@enterprisedb.com> <3f0b79eb1003230017v16f4ecbeyc20e75beeffe8f1c@mail.gmail.com> <4BAA060A.2020000@enterprisedb.com> <3f0b79eb1003240620h209a0a40ud2063728b5db31a6@mail.gmail.com> In-Reply-To: <3f0b79eb1003240620h209a0a40ud2063728b5db31a6@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.393 tagged_above=-10 required=5 tests=AWL=0.206, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/1006 X-Sequence-Number: 159782 Fujii Masao wrote: >> sources &= ~failedSources; >> failedSources |= readSource; > > The above lines in XLogPageRead() seem not to be required in normal > recovery case (i.e., standby_mode = off). So how about the attached > patch? > > *** 9050,9056 **** next_record_is_invalid: > --- 9047,9056 ---- > readSource = 0; > > if (StandbyMode) > + { > + failedSources |= readSource; > goto retry; > + } > else > return false; That doesn't work because readSource is cleared above. But yeah, failedSources is not needed in archive recovery, so that line can be removed. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com