Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id F4220633E38 for ; Thu, 25 Mar 2010 07:05:55 -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 71480-09 for ; Thu, 25 Mar 2010 10:05:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og121.obsmtp.com (exprod7og121.obsmtp.com [64.18.2.20]) by mail.postgresql.org (Postfix) with SMTP id D49D66335B6 for ; Thu, 25 Mar 2010 07:05:44 -0300 (ADT) Received: from source ([209.85.219.210]) by exprod7ob121.postini.com ([64.18.6.12]) with SMTP ID DSNKS6s1dhfsTdHwEBM24Pj5Jyohz18yUtvf@postini.com; Thu, 25 Mar 2010 03:05:44 PDT Received: by ewy2 with SMTP id 2so703175ewy.20 for ; Thu, 25 Mar 2010 03:05:42 -0700 (PDT) Received: by 10.213.46.145 with SMTP id j17mr1827746ebf.89.1269511541779; Thu, 25 Mar 2010 03:05:41 -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 13sm663869ewy.5.2010.03.25.03.05.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 25 Mar 2010 03:05:40 -0700 (PDT) Message-ID: <4BAB3571.8070001@enterprisedb.com> Date: Thu, 25 Mar 2010 12:05:37 +0200 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Simon Riggs CC: Fujii Masao , Aidan Van Dyk , PostgreSQL-development Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL 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> <1269472981.8481.8946.camel@ebony> <3f0b79eb1003241908n1e8f38e0q7cd7465163b3d7af@mail.gmail.com> <1269505375.8481.8977.camel@ebony> In-Reply-To: <1269505375.8481.8977.camel@ebony> 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.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/1002 X-Sequence-Number: 159778 Simon Riggs wrote: > On Thu, 2010-03-25 at 11:08 +0900, Fujii Masao wrote: >> And if the trigger file is >> found, I think that the startup process should emit a FATAL, i.e., the >> server should exit immediately, to prevent the server from becoming the >> primary in a half-finished state. > > Please remember that "half-finished" is your judgment on what has > happened in the particular scenario you are considering. In many cases, > an invalid WAL record clearly and simply indicates the end of WAL and we > should start up normally. Not in the archive. An invalid WAL record in a file in pg_xlog is usually an indication of end-of-WAL, but there should be no invalid records in the archived WAL files, or streamed from the master. > "State" is a good word here. I'd like to see the server have a clear > state model with well documented transitions between them. The state > should also be externally queriable, so we can work out what its doing > and how long we can expect it to keep doing it for. Agreed. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com