Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsDh1-0002x0-SN for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Oct 2015 17:42:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZsDh1-0008UT-AV for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Oct 2015 17:42:23 +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) (envelope-from ) id 1ZsDgP-0007Q6-0n for pgsql-bugs@postgresql.org; Fri, 30 Oct 2015 17:41:45 +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) (envelope-from ) id 1ZsDgM-0008PK-GA for pgsql-bugs@postgresql.org; Fri, 30 Oct 2015 17:41:44 +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 t9UHfa2i016582; Fri, 30 Oct 2015 13:41:36 -0400 From: Tom Lane To: Kevin Grittner cc: "sean@chittenden.org" , "pgsql-bugs@postgresql.org" Subject: Re: BUG #13667: SSI violation... In-reply-to: <1285273220.277372.1446226561203.JavaMail.yahoo@mail.yahoo.com> References: <1810271785.1293615.1444427336478.JavaMail.yahoo@mail.yahoo.com> <1285273220.277372.1446226561203.JavaMail.yahoo@mail.yahoo.com> Comments: In-reply-to Kevin Grittner message dated "Fri, 30 Oct 2015 17:36:01 -0000" Date: Fri, 30 Oct 2015 13:41:36 -0400 Message-ID: <16581.1446226896@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Kevin Grittner writes: > Thanks to Thomas Munro joining me in a 2.5 day marathon hunt for > this bug, we have found it and squashed it with the attached patch. > ... > These checks are about as close to free as you can get if the > transaction doing the check is not serializable; it doesn't even > need to take out a LW lock to determine there is nothing to be > done. The reason given in the comment still has merit for > serializable transactions; even for them the check is orders of > magnitude cheaper than a WAL logged tuple insert. It only requires > an occasional serialization failure detection there to come out > ahead. So rather than move the existing check, we added a recheck > after. > Barring objections I will push this tomorrow, including > back-patching it to all supported branches. I'm okay with the substance of the patch, but that's a pretty miserable excuse for fixing the comments. Both the initial checks and the rechecks ought to have at least a couple of sentences recapping the logic you gave us here. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs