Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bogWw-0004B1-BW for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Sep 2016 00:45:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bogWu-0006f5-W7 for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Sep 2016 00:45:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bogWs-0006dW-Mq for pgsql-hackers@postgresql.org; Tue, 27 Sep 2016 00:45:50 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bogWl-0004tB-UR for pgsql-hackers@postgresql.org; Tue, 27 Sep 2016 00:45:49 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id B1F94208A2; Mon, 26 Sep 2016 20:45:42 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 26 Sep 2016 20:45:42 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=UbRvxq4ucERD5aCUNhH9c4YnXxw=; b=Q/vRs 1kXEnfxy3YiJKWq6z2iGRkCF8xXnMT705xCtm1ONZge+6Z6cY43NVEFbtUO/DPJM ZmvE1lcB4K4au+Vnba1CM8TsuK15NjI8EPb11uOK3ln40Rpekg0y6ZI2vgEXo/V5 8h17LH6vdnSOvbTrTpkdIy14/9N3t1uit7Sdf4= X-Sasl-enc: 0tSYnAg6JPwBI45vrvsehNDHa28CeaTwKlAdm5GC4rxr 1474937142 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 4D74DF29CE; Mon, 26 Sep 2016 20:45:42 -0400 (EDT) Subject: Re: [COMMITTERS] pgsql: pg_ctl: Detect current standby state from pg_control To: Tom Lane , Michael Paquier References: <18364.1474818887@sss.pgh.pa.us> <27012.1474894431@sss.pgh.pa.us> <1b5f8f59-e3b4-b158-ef88-d409b413ec43@2ndquadrant.com> Cc: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 26 Sep 2016 20:45:41 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1b5f8f59-e3b4-b158-ef88-d409b413ec43@2ndquadrant.com> Content-Type: multipart/mixed; boundary="------------B6755BCFB3F97640950F839F" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is a multi-part message in MIME format. --------------B6755BCFB3F97640950F839F Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 9/26/16 7:56 PM, Peter Eisentraut wrote: > On 9/26/16 8:53 AM, Tom Lane wrote: >> I think that it's 100% pointless for get_control_dbstate >> to be worried about transient CRC failures. If writes to pg_control >> aren't atomic then we have problems enormously larger than whether >> "pg_ctl promote" throws an error or not. > > The new code was designed to handle that, but if we think it's not an > issue, then we can simplify it. I'm on it. How about this? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --------------B6755BCFB3F97640950F839F Content-Type: invalid/octet-stream; name="0001-Fix-CRC-check-handling-in-get_controlfile.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Fix-CRC-check-handling-in-get_controlfile.patch"