Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fcfbT-0001Xw-Gk for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Jul 2018 23:29:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fcfbR-0004Pr-Un for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Jul 2018 23:29:57 +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 1fcfbR-0004Pk-Nz for pgsql-hackers@lists.postgresql.org; Mon, 09 Jul 2018 23:29:57 +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.89) (envelope-from ) id 1fcfbO-0007cO-KP for pgsql-hackers@postgresql.org; Mon, 09 Jul 2018 23:29:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w69NTgjq003391; Mon, 9 Jul 2018 19:29:42 -0400 From: Tom Lane To: Kyotaro HORIGUCHI cc: amit.kapila16@gmail.com, robertmhaas@gmail.com, simon@2ndquadrant.com, ah@cybertec.at, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Possibly too stringent Assert() in b-tree code In-reply-to: <20180626.184748.29200427.horiguchi.kyotaro@lab.ntt.co.jp> References: <18732.1474819260@sss.pgh.pa.us> <20180626.184748.29200427.horiguchi.kyotaro@lab.ntt.co.jp> Comments: In-reply-to Kyotaro HORIGUCHI message dated "Tue, 26 Jun 2018 18:47:48 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3389.1531178982.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 09 Jul 2018 19:29:42 -0400 Message-ID: <3390.1531178982@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Kyotaro HORIGUCHI writes: > At Mon, 26 Sep 2016 09:12:04 +0530, Amit Kapila wrote in >>> It seems to me that we do take actions for conflict resolution during >>> the page deletion (that looks to be covered by XLOG_HEAP2_CLEANUP_INFO >>> which we emit in vacuum), but not sure if that is sufficient. >>> Consider a case where the new transaction is started on standby after >> >> Here by new transaction, I intend to say some newer snapshot with >> valid MyPgXact->xmin. > I agree to the diagnosis. So the WAL record is not necessary if > it is a new page since no one cannot be grabbing it. Thanks for reviving this thread and reviewing the problem. I pushed the patch now with some more work on the comments. regards, tom lane