Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s96Xq-00HOLX-L4 for pgsql-bugs@arkaria.postgresql.org; Mon, 20 May 2024 17:11:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s96Xq-003oi0-HY for pgsql-bugs@arkaria.postgresql.org; Mon, 20 May 2024 17:11:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s96Xq-003ohr-8k for pgsql-bugs@lists.postgresql.org; Mon, 20 May 2024 17:11:30 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s96Xo-0019a0-1b for pgsql-bugs@postgresql.org; Mon, 20 May 2024 17:11:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 44KHBOaJ3538124; Mon, 20 May 2024 13:11:24 -0400 From: Tom Lane To: depesz@depesz.com cc: pgsql-bugs mailing list , David Rowley Subject: Re: UNION removes almost all rows (not duplicates) - in fresh build of pg17! In-reply-to: References: Comments: In-reply-to hubert depesz lubaczewski message dated "Mon, 20 May 2024 17:59:59 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3538122.1716225084.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 20 May 2024 13:11:24 -0400 Message-ID: <3538123.1716225084@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk hubert depesz lubaczewski writes: > $ select count(*) from ( select * from pg_class where relkind =3D 'r' un= ion select * from pg_class where relkind =3D 'i' ); > count > =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > 1 > (1 row) Ugh, that is awful. Bisecting shows it broke at commit 66c0185a3d14bbbf51d0fc9d267093ffec735231 Author: David Rowley Date: Mon Mar 25 14:31:14 2024 +1300 Allow planner to use Merge Append to efficiently implement UNION I've not looked at the patch, but somehow it's totally forgetting what it's supposed to be unique-ifying on. regards, tom lane