Re: parallel sequential scan returns extraneous rows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Day <blake(at)rcmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: parallel sequential scan returns extraneous rows
Date: 2016-11-29 16:19:13
Message-ID: 22908.1480436353@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Day <blake(at)rcmail(dot)com> writes:
> I have found a nasty bug when using parallel sequential scans with an exists clause on postgresql 9.6.1. I have found that the rows returned using parallel sequential scan plans are incorrect (though I haven’t dug sufficiently to know in what ways). See below for an example of the issue.

Hm, looks like a planner error: it seems to be forgetting that the join
to "address" should be a semijoin. "address" should either be on the
inside of a "Semi" join (as in your first, correct-looking plan) or be
passed through a unique-ification stage such as a HashAgg. Clearly,
neither thing is happening in the second plan.

I couldn't reproduce this in a bit of trying, however. Can you come
up with a self-contained test case?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2016-11-29 19:28:47 Re: [BUGS] object_classes array is broken, again
Previous Message Tom Lane 2016-11-29 15:26:24 Re: BUG #14439: Trigger function fails with internal error after upgrade to 9.6