Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDYXo-0001M7-G8 for pgsql-general@arkaria.postgresql.org; Wed, 24 May 2017 15:49:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dDYXn-0005bF-T7 for pgsql-general@arkaria.postgresql.org; Wed, 24 May 2017 15:49:51 +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.84_2) (envelope-from ) id 1dDYVO-0007BP-IV for pgsql-general@postgresql.org; Wed, 24 May 2017 15:47:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dDYVL-0000lp-7l for pgsql-general@postgresql.org; Wed, 24 May 2017 15:47:22 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4OFlEBt018405; Wed, 24 May 2017 11:47:14 -0400 From: Tom Lane To: Michael Paquier cc: y39chen , PostgreSQL mailing lists Subject: Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup In-reply-to: References: <1495609157661-5963011.post@n3.nabble.com> <2253.1495639128@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Wed, 24 May 2017 11:39:27 -0400" Date: Wed, 24 May 2017 11:47:13 -0400 Message-ID: <2353.1495640833@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Michael Paquier writes: > On Wed, May 24, 2017 at 11:18 AM, Tom Lane wrote: >> This looks a whole lot like a bug we fixed in 9.3.15, cf >> https://www.postgresql.org/message-id/flat/DB5PR07MB15416C65687A1EA9AC0D26F8D6E00%40DB5PR07MB1541.eurprd07.prod.outlook.com > To which commit are you referring here? I don't recall any fixes > related to that, and there is nothing in the git history indicating > so. Wup, sorry, I quoted the wrong thread mentioning btree_xlog_delete_get_latestRemovedXid. The right one is https://www.postgresql.org/message-id/flat/00F0B2CEF6D0CEF8A90119D4%40eje.credativ.lan and the patch is Author: Tom Lane Branch: master [0e0f43d6f] 2016-08-31 08:52:13 -0400 Branch: REL9_6_STABLE Release: REL9_6_0 [3fc489cb3] 2016-08-31 08:52:13 -0400 Branch: REL9_5_STABLE Release: REL9_5_5 [c40bb1155] 2016-08-31 08:52:13 -0400 Branch: REL9_4_STABLE Release: REL9_4_10 [f4e40537e] 2016-08-31 08:52:13 -0400 Branch: REL9_3_STABLE Release: REL9_3_15 [baf111d31] 2016-08-31 08:52:13 -0400 Branch: REL9_2_STABLE Release: REL9_2_19 [823df401d] 2016-08-31 08:52:13 -0400 Branch: REL9_1_STABLE Release: REL9_1_24 [e3439a455] 2016-08-31 08:52:13 -0400 Prevent starting a standalone backend with standby_mode on. This can't really work because standby_mode expects there to be more WAL arriving, which there will not ever be because there's no WAL receiver process to fetch it. Moreover, if standby_mode is on then hot standby might also be turned on, causing even more strangeness because that expects read-only sessions to be executing in parallel. Bernd Helmle reported a case where btree_xlog_delete_get_latestRemovedXid got confused, but rather than band-aiding individual problems it seems best to prevent getting anywhere near this state in the first place. Back-patch to all supported branches. In passing, also fix some omissions of errcodes in other ereport's in readRecoveryCommandFile(). Michael Paquier (errcode hacking by me) Discussion: <00F0B2CEF6D0CEF8A90119D4@eje.credativ.lan> regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general