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 1lOmSx-0003ly-H6 for pgsql-committers@arkaria.postgresql.org; Tue, 23 Mar 2021 19:13:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOmSw-0004Zl-CK for pgsql-committers@arkaria.postgresql.org; Tue, 23 Mar 2021 19:13:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOmSw-0004Ze-6s for pgsql-committers@lists.postgresql.org; Tue, 23 Mar 2021 19:13:22 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOmSu-0000E8-2d for pgsql-committers@lists.postgresql.org; Tue, 23 Mar 2021 19:13:21 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id E13B05C00C8; Tue, 23 Mar 2021 15:13:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 23 Mar 2021 15:13:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=R8KqoFUQJ5AWd+aJkSWhig3W9Ip jXdcQyzJ9ETrTBE8=; b=CGL+zVuPihDkoOXzg8o8N7mv8Te0Y/bDWD6lP14fMlz TGOlVkHHMyrJ0Rr4mbjDyHvY2r4L5Lgqk7Ke88R6I3mVnTOPNCfu1QaoxEdWj+UO P34qkekQvLRipgHV5xX+RAaMZyBmRYiXWbc7mpBwpdUpTUWccbqkImYaTWKzmINB Dc0s9cyxS3NWK458XJw36AwqSt87kd/tpltiioMwJRPKXJEcBFT9XLWhNa8OGDFR S1WCP9Xp4W9ImanRzaqDv9DdfqNdh95gZAXiiAjujhCgwgwEwFon6SdSuXSnf3Br cbZs/PfE+3uyYr+bspaRm2971VPohI3edkag/aehyEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=R8KqoF UQJ5AWd+aJkSWhig3W9IpjXdcQyzJ9ETrTBE8=; b=pXf673hCI/RApbOwzmIlSa Q/8CE3yU7XALD1GadCTjRtneXQdaDLnbMBTHP7yDIHM3QVC5z3U2/6+RNTZVAvx8 WfuYzDET42YcMoN9mXZCvIXSMvQkZGqcGH7yGzkTna/rI0VmpU6h5j8eqI66yQOZ yNIp1XlFImn6iojnA0Zq+X4izSD6MK3G/UFRI2ilqz4vqWreRMBu3JeJ/oYl+bSW XfxZs0XFPWc7wfm5cngadyFKp9NP5ugPysy40kxmEf1ZbrLBsF69fk5gQ15O7siq yXdx96gQBs/jlWFM6BIeVupiaSgJdvJfuxm7E1IU7LsSHuPk+nMfHG4u7z8IB4Gg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegiedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeff hfeuffdunecukfhppeeijedrudeitddrvddujedrvdehtdenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghl rdguvg X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id 4BE6C108006A; Tue, 23 Mar 2021 15:13:08 -0400 (EDT) Date: Tue, 23 Mar 2021 12:13:07 -0700 From: Andres Freund To: Amit Kapila Cc: Tom Lane , Robert Haas , Amit Kapila , pgsql-committers Subject: Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode Message-ID: <20210323191307.twhewx7vqj2ocglv@alap3.anarazel.de> References: <558385.1616423602@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2021-03-23 09:01:13 +0530, Amit Kapila wrote: > Okay, I can revert this work to avoid that risk but it would be great > if you can share your thoughts on what alternative design do you have > in mind, and or how it should be better implemented? Regarding > performance overhead, it is for partitioned tables with a large number > of partitions, and that too when the data to insert is not that much > or there is parallel-unsafe clause on one of the partitions. Now, how > else can we determine the parallel-safety without checking each of the > partitions? You cache it. And actually use information that is already cached. There's a huge difference between doing expensive stuff once every now and then, and doing it over and over and over. That's why we have relcache, syscache, typecache etc. > We do have other partition-related gucs (enable_partition*) to avoid > the partitions-related overhead so why is it so bad to have guc here > (maybe the naming of guc/reloption is not good)? Most of those seem more about risk-reduction. And they don't have reloptions - which seems to be the only way this feature can realistically be used. The one halfway comparable GUC is enable_partitionwise_join - while it'd be great to not need it (or at least not default to off), it implies some legitimately computationally hard work that can't easily be cached. Greetings, Andres Freund