Re: BUG #14208: Inconsistent code modification - 3 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #14208: Inconsistent code modification - 3
Date
Msg-id 8242.1467304819@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #14208: Inconsistent code modification - 3  (Andres Freund <andres@anarazel.de>)
Responses Re: BUG #14208: Inconsistent code modification - 3  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
Andres Freund <andres@anarazel.de> 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostGres 9.5 [ and earlier ] "SET SEARCH_PATH TO "+ cSchema + ";"
Next
From: Andres Freund
Date:
Subject: Re: BUG #14208: Inconsistent code modification - 3