Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VFWZF-0002Vu-Na for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Aug 2013 21:49:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VFWZF-0006MI-80 for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Aug 2013 21:49:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VFWZE-0006MC-LR for pgsql-bugs@postgresql.org; Fri, 30 Aug 2013 21:49:20 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VFWZB-0005Gx-VT for pgsql-bugs@postgresql.org; Fri, 30 Aug 2013 21:49:20 +0000 Received: from anarazel.de (p54AF4A79.dip0.t-ipconnect.de [84.175.74.121]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MELXc-1VDLm70Cng-00FRu3; Fri, 30 Aug 2013 23:49:15 +0200 Received: by anarazel.de (Postfix, from userid 1000) id 6F8C2100A6D; Fri, 30 Aug 2013 23:49:14 +0200 (CEST) Date: Fri, 30 Aug 2013 23:49:14 +0200 From: Andres Freund To: Tom Lane Cc: terje@elde.net, pgsql-bugs@postgresql.org Subject: Re: BUG #8410: out of binary heap slots Message-ID: <20130830214914.GF8932@awork2.anarazel.de> References: <20130830210015.GA8932@awork2.anarazel.de> <20130830210525.GB8932@awork2.anarazel.de> <19714.1377897831@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19714.1377897831@sss.pgh.pa.us> X-Provags-ID: V02:K0:Uj+VpowgjL1RGBc4N3KYVGa1pQziMnEm6TxC5gFP7Kb 17Fzl8Y9a0fxuzS3vgfgTeFgl+UWIoMV1PVmnLf6VUXqKRlTCb mjusN2VjH8W86UMESJvgKj+KDSsO/INGyN/ZRm20SV2ctIEqEU uacrHJTZNUHss7aHjLrA+oz4pGHccUUrVjZq8wpSCq7v+IHloh RWvxOOTXh41V6xjLVcQEP+3QFWc+xfBeWBdHU/rvy9ejj8aUzj e+iYKaE5bny6dmpw+5jngx5hd9WcLA1GbfsmtSp9AmtDntNaTx 3k8N67Z/JJ7BZql5a18xXhA0s3zcn4NsFb0wgoGqDyGEgA88fg 7lbZendaynaexVTGSRfcE4GBT7bEKV6yDD2YKfOBV X-Pg-Spam-Score: -1.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 On 2013-08-30 17:23:51 -0400, Tom Lane wrote: > Andres Freund writes: > > No need, found the bug. And I think can build a testcase myself. > > > ExecReScanMergeAppend resets ms_initialized, but doesn't clear the > > binaryheap. Thus no new elements fit. > > Sounds like a bug all right, but I'm not convinced it explains Terje's > report. The thing this theory doesn't explain is why would Terje be > having trouble reproducing the failure? Seems like re-running the same > query ought to produce the same failure. Even better explanation: The merge append is some steps below a LockRows node, so the number of rescans might depend on the concurrency because we'll do the EvalPlanQual dance on a concurrent row update. Terje, do you use read committed or repeatable read/serializable? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs