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 1hq2fJ-0006yv-3d for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jul 2019 21:49:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hq2fH-0000wJ-Gy for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jul 2019 21:49:43 +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 1hq2fH-0000wB-66 for pgsql-bugs@lists.postgresql.org; Tue, 23 Jul 2019 21:49:43 +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 1hq2fE-00075H-UJ for pgsql-bugs@lists.postgresql.org; Tue, 23 Jul 2019 21:49:42 +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 x6NLndh7031207; Tue, 23 Jul 2019 17:49:39 -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> Comments: In-reply-to David Raymond message dated "Tue, 23 Jul 2019 21:42:06 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31205.1563918579.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 23 Jul 2019 17:49:39 -0400 Message-ID: <31206.1563918579@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Raymond writes: > Update so far: I did manage to go and replace all the UUIDs with random = ones and it's still doing it, so I do have a sanitized version now. No rea= l luck with trimming down the record count though. When deleting too many = records it would change the query plan to something not broken. Even after= replacing the UUIDs and not deleting anything I ran analyze and it came u= p clean, and I had to vacuum analyze for it to pick the broken plan again.= (That example pasted below) The dump file is at least consistently doing = the same thing where immediately after load the plan chosen gives a consis= tent answer, but once analyzed it gives the bad duplicates. As it stands t= he dump file is 130 MB (30MB zipped), is that too big to send in to you? Given that the problem seems to be specific to parallel query, likely the reason is that reducing the number of rows brings it below the threshold where the planner wants to use parallel query. So you could probably reduce the parallel-query cost parameters to get a failure with a smaller test case. However, if you don't feel like doing that, that's fine. Please *don't* send a 30MB message to the whole list, but you can send it to me privately. regards, tom lane