Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 810A5632D8B for ; Thu, 14 May 2009 15:49:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 58413-02 for ; Thu, 14 May 2009 15:49:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.217.172]) by mail.postgresql.org (Postfix) with ESMTP id 3348963286F for ; Thu, 14 May 2009 15:49:31 -0300 (ADT) Received: by gxk20 with SMTP id 20so589144gxk.19 for ; Thu, 14 May 2009 11:49:30 -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=uMcbs0djnj0wjozZkzE/oAK1yVa7h9C1OVB4+uMCJuc=; b=B9KVxRLwW17tdhbvv7pfqMjS2t8QaYH3jRJk1m+wUQ3KQJsP6Ydp6/8YjQaYNgfJox F5R8DvTMbfPfipB9C1bz521jA7GLpxYgMnS00eGFkCRtWxm29AZnbSw7xUU8xMoG7l8F NA3cgZBsFEUbJn3L6MmnWx9WzGTi/6K/vsGmQ= 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=q0/xxfZcpUD6NEN5Do+xlZJeP0rP+Fbq9VOgiz1CUQTvjssEiBqu+MJ7XjCFcqfuM8 GPFgpseDYzoQeYCx9B6AbJg9Gp+qSkyRowiXz0pCTS3fN5TNJjIf9qkYsLOdColZy+N/ ew9/TWHzfhqXQQmbePqorXvHTcajvdUkoKf2k= MIME-Version: 1.0 Received: by 10.150.219.8 with SMTP id r8mr4177139ybg.330.1242326970180; Thu, 14 May 2009 11:49:30 -0700 (PDT) In-Reply-To: <1242315415.3843.526.camel@ebony.2ndQuadrant> References: <3f0b79eb0903242329j12865d55s348f5c873a956e71@mail.gmail.com> <49F01D79.8020805@enterprisedb.com> <3f0b79eb0904230515p751b5248n6ef96880617db055@mail.gmail.com> <4A095A39.3030100@enterprisedb.com> <3f0b79eb0905130127u3a3275b1w79f4d8cb729ded36@mail.gmail.com> <4A0A86D2.9080602@enterprisedb.com> <1985.1242234105@sss.pgh.pa.us> <4A0B10C7.2040309@enterprisedb.com> <1242247404.3843.503.camel@ebony.2ndQuadrant> <1242315415.3843.526.camel@ebony.2ndQuadrant> Date: Fri, 15 May 2009 03:49:29 +0900 Message-ID: <3f0b79eb0905141149lf5cef92j538f490c86dfedf8@mail.gmail.com> Subject: Re: New trigger option of pg_standby From: Fujii Masao To: Simon Riggs Cc: Heikki Linnakangas , Tom Lane , Guillaume Smet , Peter Eisentraut , Kevin Grittner , pgsql-hackers 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=0.291 tagged_above=0 required=5 tests=AWL=0.291 X-Spam-Level: X-Archive-Number: 200905/623 X-Sequence-Number: 138165 Hi, On Fri, May 15, 2009 at 12:36 AM, Simon Riggs wrote: > > On Wed, 2009-05-13 at 21:43 +0100, Simon Riggs wrote: >> On Wed, 2009-05-13 at 21:26 +0300, Heikki Linnakangas wrote: >> >> > This whole thing can be considered to be a new feature. >> >> recovery.conf will contain a new optional parameter: >> >> recovery_end_command (string) > > Implemented. > + ereport(signaled ? FATAL : WARNING, > + (errmsg("recovery_end_command \"%s\": return code %d", > + xlogRecoveryEndCmd, rc))); In fast failover case, pg_standby has to delete the trigger file immediately if it's found. Otherwise, recovery may go wrong as I already described. http://archives.postgresql.org/pgsql-hackers/2009-04/msg01139.php So, in fast mode, recovery_end_command would always fail to delete the trigger file, and cause warning. This is odd behavior, I think. We should change WARNING to DEBUG2 like RestoreArchivedFile() in the above code? Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center