Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1magOx-0005QS-Qn for pgsql-general@arkaria.postgresql.org; Wed, 13 Oct 2021 15:42:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1magOw-0007sp-JI for pgsql-general@arkaria.postgresql.org; Wed, 13 Oct 2021 15:42:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1magOw-0007sh-A0 for pgsql-general@lists.postgresql.org; Wed, 13 Oct 2021 15:42:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1magOq-0001Mk-5y for pgsql-general@lists.postgresql.org; Wed, 13 Oct 2021 15:42:41 +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 19DFgW8C653390; Wed, 13 Oct 2021 11:42:32 -0400 From: Tom Lane To: "pbj@cmicdo.com" cc: "pgsql-general@lists.postgresql.org" Subject: Re: Detecting mis-planning of repeated application of a projection step In-reply-to: <875836830.1265621.1634139297776@mail.yahoo.com> References: <875836830.1265621.1634139297776.ref@mail.yahoo.com> <875836830.1265621.1634139297776@mail.yahoo.com> Comments: In-reply-to "pbj@cmicdo.com" message dated "Wed, 13 Oct 2021 15:34:57 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <653388.1634139752.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 13 Oct 2021 11:42:32 -0400 Message-ID: <653389.1634139752@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "pbj@cmicdo.com" writes: > The 13.4 release notes document the following: > =C2=A0> Fix mis-planning of repeated application of a projection step (T= om Lane) > =C2=A0> > =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The planner could create an incorr= ect plan in cases where two > =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ProjectionPaths were stacked on to= p of each other. The only known > =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 way to trigger that situation invo= lves parallel sort operations, > =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 but there may be other instances. = The result would be crashes or > =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 incorrect query results. Disclosur= e of server memory contents is also > =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 possible. (CVE-2021-3677) > =C2=A0> > Is there a way to detect if this is happening and could this problem cau= se very bad, but successful, plans to be created?=C2=A0 We are seeing 13.3= create horrible plans for some queries, where 13.4 creates great plans fo= r the same queries. No, whatever you're seeing, it was not this particular bug. regards, tom lane