Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8X3i-0000eb-Aa for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Jun 2016 18:09:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b8X3h-0004Fv-4W for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Jun 2016 18:09:29 +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 1b8X3d-0004Cd-TB for pgsql-bugs@postgresql.org; Thu, 02 Jun 2016 18:09:25 +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 1b8X3W-000809-Cy for pgsql-bugs@postgresql.org; Thu, 02 Jun 2016 18:09:25 +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 u52I9Gj0004418; Thu, 2 Jun 2016 14:09:16 -0400 From: Tom Lane To: Kevin Grittner cc: yancya@upec.jp, "pgsql-bugs@postgresql.org" Subject: Re: BUG #14169: Incorrect merge join result in 9.5 In-reply-to: References: <20160601065921.30388.33069@wrigleys.postgresql.org> <13951.1464797452@sss.pgh.pa.us> Comments: In-reply-to Kevin Grittner message dated "Thu, 02 Jun 2016 12:36:41 -0500" Date: Thu, 02 Jun 2016 14:09:16 -0400 Message-ID: <4417.1464890956@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) 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: > On Wed, Jun 1, 2016 at 11:15 AM, Kevin Grittner wrote: >> On Wed, Jun 1, 2016 at 11:10 AM, Tom Lane wrote: >>> In short: Kevin, you broke mark/restore. Please fix. >> I'm on it. > Fix pushed. I confirm this fixes the submitted test case. > Basically, I reverted an attempt to optimize repeated > restores to the same page. I had a rather bad thinko there where I > essentially assumed that it was also to the same mark, so advancing > marks on the same page caused the bug. There's probably room to > optimize that with more refined logic, but for now I just reverted > the problem code. Sounds reasonable. The comments in that removed hunk of code had made me suspicious as heck the moment I saw them ... > I reduced the test case supplied by the OP to something smaller > which still failed the assertion without the patch, but am having > trouble getting it to run in the regression test environment with a > stable plan. Best bet might be to use a temp table, so that autoanalyze won't touch it. 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