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 1lOoKL-0008GN-Qh for pgsql-committers@arkaria.postgresql.org; Tue, 23 Mar 2021 21:12:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOoKK-0005QZ-IC for pgsql-committers@arkaria.postgresql.org; Tue, 23 Mar 2021 21:12:36 +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 1lOoKK-0005Of-Cr for pgsql-committers@lists.postgresql.org; Tue, 23 Mar 2021 21:12:36 +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 1lOoKI-0006X0-18; Tue, 23 Mar 2021 21:12:35 +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 12NLCTKg1011363; Tue, 23 Mar 2021 17:12:29 -0400 From: Tom Lane To: Alvaro Herrera cc: Robert Haas , Andres Freund , Amit Kapila , Amit Kapila , pgsql-committers Subject: Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode In-reply-to: <20210323202958.GA18316@alvherre.pgsql> References: <20210323202958.GA18316@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 23 Mar 2021 17:29:58 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1011361.1616533949.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 23 Mar 2021 17:12:29 -0400 Message-ID: <1011362.1616533949@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2021-Mar-23, Robert Haas wrote: >> Likewise, the XXX comment you added to max_parallel_hazard_walker >> claims that some of the code introduced there is to compensate for an >> unspecified bug in the rewriter. > I think the CTE bug is this one: > https://www.postgresql.org/message-id/flat/CAJcOf-fAdj=3DnDKMsRhQzndm-O1= 3NY4dL6xGcEvdX5Xvbbi0V7g@mail.gmail.com > while I can't disagree with the overall conclusion that it seems safer > to revert parallel INSERT/SELECT given the number of alleged problems, > it is true that this bug exists, and has gone unfixed. Yeah, because it's not totally clear whether we want to fix it by disallowing the case, or by significantly changing the way the rewriter works. It'd be good if some of the folks on this thread weighed in on that choice. (Having said that, another complaint about this particular comment is that it doesn't mention how the planner should be changed once the rewriter is fixed. Is it sufficient to delete the stanza below the comment? Just looking at it, I wonder whether max_parallel_hazard_walker is now being invoked on portions of the Query tree that we'd not have to traverse at all given a rewriter fix.) regards, tom lane