Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIf1c-0003aU-Nz for pgsql-bugs@arkaria.postgresql.org; Thu, 30 Jun 2016 16:41:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bIf1c-0003vK-26 for pgsql-bugs@arkaria.postgresql.org; Thu, 30 Jun 2016 16:41:12 +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 1bIf0y-0003Cn-Ub for pgsql-bugs@postgresql.org; Thu, 30 Jun 2016 16:40:32 +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 1bIf0r-0002zf-OE for pgsql-bugs@postgresql.org; Thu, 30 Jun 2016 16:40:32 +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 u5UGeJXt008243; Thu, 30 Jun 2016 12:40:19 -0400 From: Tom Lane To: Andres Freund cc: petrum@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #14208: Inconsistent code modification - 3 In-reply-to: <20160623225301.4v7heuiyvkfwi5ev@alap3.anarazel.de> References: <20160622144830.5791.22512@wrigleys.postgresql.org> <31897.1466610316@sss.pgh.pa.us> <20160623225301.4v7heuiyvkfwi5ev@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 23 Jun 2016 15:53:01 -0700" Date: Thu, 30 Jun 2016 12:40:19 -0400 Message-ID: <8242.1467304819@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) 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 Andres Freund writes: > On 2016-06-22 11:45:16 -0400, Tom Lane wrote: >> Actually, the function is ReorderBufferIterTXNInit, and in HEAD this >> is line 963, but yeah that looks pretty broken. Andres, do you >> concur? > Ugh, yes, that looks broken. In a way that can very likely lead to wrong > data being returned :(. I assume an empty toplevel transaction + > subtransactions with spilled-to-disk contents will be bad. Actually, doesn't this mean spilled subtransactions will *always* be lost? Whether or not the toplevel transaction is empty, by the time we get here it would have nentries == nentries_mem, no? Anyway, fix pushed. I did not try to devise a regression test case. 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