Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hqKiz-0001Ky-Un for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Jul 2019 17:06:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hqKiy-00043r-OJ for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Jul 2019 17:06:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hqKiy-00043k-DQ for pgsql-bugs@lists.postgresql.org; Wed, 24 Jul 2019 17:06:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hqKiv-0001UY-MS for pgsql-bugs@lists.postgresql.org; Wed, 24 Jul 2019 17:06:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6OH6cGG030487; Wed, 24 Jul 2019 13:06:38 -0400 From: Tom Lane To: David Raymond cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #15922: Simple select with multiple exists filters returns duplicates from a primary key field In-reply-to: References: <15922-969d62a9b4d95ee1@postgresql.org> <7671.1563904324@sss.pgh.pa.us> <31206.1563918579@sss.pgh.pa.us> Comments: In-reply-to David Raymond message dated "Wed, 24 Jul 2019 15:33:59 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30485.1563987998.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 24 Jul 2019 13:06:38 -0400 Message-ID: <30486.1563987998@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Raymond writes: > The cost tweaks let me slash the size right down to where the dump is 15= 0 kB, which I've attached. Don't know if the mailing list will strip it, b= ut 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=3Dpostgresql.git&a=3Dcommitdiff&h=3D1= 4d8b539d 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