Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqH6H-0004aQ-2p for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Aug 2018 12:10:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fqH6F-00064o-AI for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Aug 2018 12:09:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqH6E-00064h-GF for pgsql-bugs@lists.postgresql.org; Thu, 16 Aug 2018 12:09:59 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqH6B-0007r0-CN for pgsql-bugs@lists.postgresql.org; Thu, 16 Aug 2018 12:09:58 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D504622013; Thu, 16 Aug 2018 08:09:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 16 Aug 2018 08:09:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=H89M9D4djCCNAMcJTONtVp5GP26f7NFPB5w52O/eRDM=; b=dT+f8Khi eeYXD2M8IvSELyELnwHm7qb9W5a9uuleNdZ/sAMwFydyn1jVBvG1u/u+Gxal5cVC Kc/QY3ng+6zLq8RhNBo8klu/UTuO62CGvy9im3xUqLWauzQcSmY7y09IFW7HMcBL m1S37pdq6GILPyqvU0UxGt4DXOLjGFs/DZM1PoCV61PPmCG3CPyRwe3v2qNlNuWh 4RJtj64QljhtynFP3APMRJFTnlMgtz9IhW2fL4Id7Iw/uLebb6po6by8m3E/fbg5 1ubqa2gCqbTd6Vb5alE8AacwVPxwP9RGpQz07IAS8tLWZuzJ6BX+pRquCHSEoF/j 4/q17NvJ2DbtJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=H89M9D4djCCNAMcJTONtVp5GP26f7 NFPB5w52O/eRDM=; b=nBBK0l6owKxyfkCltbEZ+JfmvK7AJ42ecKkEymwTYp86b bQ0cmNg/zv7q3Lo0WwDPcnoKVgJmopK88ceN7AuTK1QKSXSB3f+cu5uNVFweQy+Y qmW1+JSrE7nwkBp8wxUoa0Oa8yjDqrTBzv29kjMG0w18RRthrQhEMcxZuNlq4WzC fuM6NaD0Otfxh+C5xObDXZkU/ZF3f3LeRr75FvI0v31IXQd2Y+owcahz2GeSDL8j 6h04JAWZUI8v1z8307i1WECefqq4p9cfPu1qqavD2jfpiRaHDFt2oqTnptucddBM ZPyjHNgejAdMwlyfbWirmMpoWKU05+ufL+ViR5nYQ== X-ME-Proxy: X-ME-Sender: Received: from intern.anarazel.de (unknown [46.183.103.17]) by mail.messagingengine.com (Postfix) with ESMTPA id 8E9C5E4519; Thu, 16 Aug 2018 08:09:52 -0400 (EDT) Date: Thu, 16 Aug 2018 05:09:43 -0700 From: Andres Freund To: Michael Paquier Cc: spam_from_pgsql_lists@chezphil.org, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15331: Please check if recovery.conf can be renamed Message-ID: <20180816120943.barvdv5c6bxo46ac@alap3.anarazel.de> References: <153441900952.1505.13879104449657146995@wrigleys.postgresql.org> <20180816115055.GN3681@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180816115055.GN3681@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-08-16 20:50:55 +0900, Michael Paquier wrote: > On Thu, Aug 16, 2018 at 11:30:09AM +0000, PG Bug reporting form wrote: > > This means that promotion fails, and for me even after fixing the > > permissions the system was in an odd state that took some work to fix. > > Failover is hard to get right; emitting a warning earlier in this case would > > mean one less thing to go wrong. > > I think that you would be interested in this recent commit (fixed as of > the last round of minor releases): > commit: cbc55da556bbcb649e059804009c38100ee98884 > committer: Michael Paquier > date: Mon, 9 Jul 2018 10:22:34 +0900 > Rework order of end-of-recovery actions to delay timeline history write > > And this thread: > https://postgr.es/m/CABUevEz09XY2EevA2dLjPCY-C5UO4Hq=XxmXLmF6ipNFecbShQ@mail.gmail.com > > To give you a summary, once recovery finished and before recovery.conf > was renamed, some on-disk actions happened, which could put the cluster > in a weird state, perhaps similarly to what you saw. How would this address OP's concern? You'd still not learn meaningfully earlier that your attempted promotion failed (instead of learning of the problem before you ever promote). Greetings, Andres Freund