RE: BUG #15922: Simple select with multiple exists filters returns duplicates from a primary key field

From: David Raymond <David(dot)Raymond(at)tomtom(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #15922: Simple select with multiple exists filters returns duplicates from a primary key field
Date: 2019-07-24 18:15:32
Message-ID: VI1PR07MB57924CA0023B6EC7019F1FB987C60@VI1PR07MB5792.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Not in a position to re-compile, no, but good to know that it's been fixed. I turned off enable_parallel_hash and the original queries that led me to this are now returning much more sane results, so that works for me until 11.5 comes out.

Thank you very much for the help.

David Raymond | Associate Quality Analyst - MPU Addressing | TomTom | Lebanon, NH, United States
e-mail: david(dot)raymond(at)tomtom(dot)com  | office +1 603 306 8498 | www.tomtom.com

-----Original Message-----
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Wednesday, July 24, 2019 1:07 PM
To: David Raymond <David(dot)Raymond(at)tomtom(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15922: Simple select with multiple exists filters returns duplicates from a primary key field

David Raymond <David(dot)Raymond(at)tomtom(dot)com> writes:
> The cost tweaks let me slash the size right down to where the dump is 150 kB, which I've attached. Don't know if the mailing list will strip it, but you're also directly in the To: list.

Thanks for the test case!

However ... I fail to reproduce any problem on HEAD or v11 branch tip.
After perusing the commit log, I believe the reason why not is this
post-11.4 bug fix:

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=14d8b539d

which I'd forgotten about, but it seems to match your problem exactly.
That makes this a duplicate of bug #15857.

Don't know if you're in a position to build from source, but if so,
that's just about a one-line fix. Otherwise, it looks like turning
off enable_parallel_hash would be the minimal workaround until 11.5
comes out next month.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Imre Samu 2019-07-24 19:23:16 Re: partition table slow planning
Previous Message Tom Lane 2019-07-24 18:02:23 Re: Attribute has wrong type in ALTER TABLE