From: Tom Lane <tgl@sss.pgh.pa.us>
To: yancya@upec.jp
Cc: pgsql-bugs@postgresql.org, Kevin Grittner <kgrittn@gmail.com>
Subject: Re: BUG #14169: Incorrect merge join result in 9.5
Date: Wed, 01 Jun 2016 12:10:52 -0400
Message-ID: <13951.1464797452@sss.pgh.pa.us> (raw)
In-Reply-To: <20160601065921.30388.33069@wrigleys.postgresql.org>
References: <20160601065921.30388.33069@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
yancya@upec.jp writes:
> TRAP: FailedAssertion("!(compareResult < 0)", File: "nodeMergejoin.c", Line:
> 942)
This is not a mergejoin logic bug, because nodeMergejoin.c didn't change
significantly between 9.4 and 9.5. It must be that the input data is not
being delivered in the expected order. I first thought that Peter G's
sorting optimizations must be at fault, but if you run either of the
mergejoin's subplans in isolation, you get correctly sorted data. What
must be happening, then, is that mergejoin's mark/restore operations are
confusing the btree indexscan and causing it to deliver the wrong tuple(s)
after a restore.
Armed with that conclusion about where the bug probably is, I looked
through the git history, and soon found that the crash goes away if
I manually revert commit 2ed5b87f96d473962ec5230fd820abfeaccb2069.
In short: Kevin, you broke mark/restore. Please fix.
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, yancya@upec.jp, kgrittn@gmail.com
Subject: Re: BUG #14169: Incorrect merge join result in 9.5
In-Reply-To: <13951.1464797452@sss.pgh.pa.us>
References: <20160601065921.30388.33069@wrigleys.postgresql.org> <13951.1464797452@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox