Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 317CB632EA0 for ; Wed, 24 Mar 2010 10:36:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 64381-02 for ; Wed, 24 Mar 2010 13:36:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yw0-f184.google.com (mail-yw0-f184.google.com [209.85.211.184]) by mail.postgresql.org (Postfix) with ESMTP id 785F063273F for ; Wed, 24 Mar 2010 10:36:35 -0300 (ADT) Received: by ywh14 with SMTP id 14so1348536ywh.15 for ; Wed, 24 Mar 2010 06:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=KdfLeBH5pbV/7uxFPBJM5estleJOX+mrG4SDcZTso04=; b=kHXyMJZOIgfuhSN3DNser4Sa0wtOOz9pSdsuIRLOuD2FNWYfzvFBReuTiPxuCncLfS EGpVq3HfEZr1FrUc/5LcbWVKR+5eM4kINvfxgwBP7aQAMI0ELTRUJig8rk0PJgHUPTrX vMutCe3YBaOm/7kkn78ljavtqi/5b5oyz2iTg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=K5BoVxceZEQAxTNzDEzAgRU7zlFVI0z6Z1RpED4Qpp5ukwz0+ityZ2FXCrQpKQxGEP 4u4ICrH/X+l9GbLOLLmaMOfYToRXE9oR3reQyHUQPKF7tWJWJD84ujDJo28lf5ak1/cu JnJLoRnU+aeaA+sWSMKttz3ZQ0X5QD+1lvXMM= MIME-Version: 1.0 Received: by 10.101.4.35 with SMTP id g35mr4398800ani.123.1269437793348; Wed, 24 Mar 2010 06:36:33 -0700 (PDT) In-Reply-To: <3f0b79eb1003240620h209a0a40ud2063728b5db31a6@mail.gmail.com> References: <3f0b79eb1002092105r21e009d3v468496058ba04392@mail.gmail.com> <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> Date: Wed, 24 Mar 2010 22:36:33 +0900 Message-ID: <3f0b79eb1003240636y6ba3d739idc4555f88c98e32e@mail.gmail.com> Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL From: Fujii Masao To: Heikki Linnakangas Cc: Simon Riggs , Aidan Van Dyk , PostgreSQL-development Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/979 X-Sequence-Number: 159755 On Wed, Mar 24, 2010 at 10:20 PM, Fujii Masao wrote= : >> Thanks. That's easily fixable (applies over the previous patch): >> >> --- a/src/backend/access/transam/xlog.c >> +++ b/src/backend/access/transam/xlog.c >> @@ -3773,7 +3773,7 @@ retry: >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pagelsn.xrecoff =3D 0; >> =A0 =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0 =A0 =A0/* Wait for the next page to become available */ >> - =A0 =A0 =A0 =A0 =A0 if (!XLogPageRead(&pagelsn, emode, false, false)) >> + =A0 =A0 =A0 =A0 =A0 if (!XLogPageRead(&pagelsn, emode_arg, false, fals= e)) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return NULL; >> >> =A0 =A0 =A0 =A0 =A0 =A0/* Check that the continuation record looks valid= */ > > Seems correct. On second thought, the following lines seem to be necessary just after calling XLogPageRead() since it reads new WAL file from another source. > if (readSource =3D=3D XLOG_FROM_STREAM || readSource =3D=3D XLOG_FROM_ARC= HIVE) > emode =3D PANIC; > else > emode =3D emode_arg; Regards, --=20 Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center