From: Tom Lane <tgl@sss.pgh.pa.us>
To: Elvis Pranskevichus <elprans@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: David Rowley <dgrowleyml@gmail.com>
Subject: Re: BUG #17213: Wrong result from a query involving Merge Semi Join and Memoize
Date: Mon, 04 Oct 2021 21:21:21 -0400
Message-ID: <4022669.1633396881@sss.pgh.pa.us> (raw)
In-Reply-To: <4374396.LvFx2qVVIh@vulcan.edgedb.net>
References: <17213-988ed34b225a2862@postgresql.org>
<CAApHDvq-auQ9rK8VzD79X77cY4AOKP0mKp1whYjfNX8xYMEZGw@mail.gmail.com>
<4374396.LvFx2qVVIh@vulcan.edgedb.net>
Elvis Pranskevichus <elprans@gmail.com> writes:
> On Monday, October 4, 2021 5:14:47 PM PDT David Rowley wrote:
>>> It appears a combination of Merge Semi Join and Memoize in
>>> PostgreSQL 14 produces incorrect results on a particular query.
> It seems like a very particular set of stats is causing the plan there,
> as running ANALYZE turns the query into a Nested Loop Semi Join.
Surely this plan tree is broken on its face? The inner side of
a mergejoin has to be able to support mark/restore, and nestloop
doesn't (cf ExecSupportsMarkRestore, as well as assertions in
nodeNestloop). It looks to me like somebody removed an essential
plan-time check.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, elprans@gmail.com, pgsql-bugs@lists.postgresql.org, dgrowleyml@gmail.com
Subject: Re: BUG #17213: Wrong result from a query involving Merge Semi Join and Memoize
In-Reply-To: <4022669.1633396881@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