Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4v9d-0002l8-86 for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Apr 2018 21:13: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 1f4v9b-0007ul-Gx for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Apr 2018 21:13:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4v9b-0007ub-9g for pgsql-hackers@lists.postgresql.org; Sat, 07 Apr 2018 21:13:43 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4v9U-0000EF-1o for pgsql-hackers@postgresql.org; Sat, 07 Apr 2018 21:13:42 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 6FE37CC0; Sat, 7 Apr 2018 17:13:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 07 Apr 2018 17:13:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=kAX1aeuVTRQ/xX2/7 Q1uDF8UEvIkbGNhHu0T9iM9CSw=; b=JCqKNLmMX2ocl1nxum+TFf0eGc0vMCNPl 8QAsYhlQ+G34Z4tbtXo8aIFAobRA83prLCj7HVncowfZ9XHODBNzwb2pPacilE6D 8b2Us6FglbFAMpyrPAdyzfSuGPnVthcIh1kLHIldLwUMSywlXpuoefeHPnXaJDf0 ZW8V7eSTTfNTZd5dAdaNlU2CtowY+52xHFGOyPisylWABD0ay+Hc66RP3cVz+cU1 tPHJemTwtimiCdECSdADe97owjJtx7uWs70FGyvOZsZTnPOpbPk5Di9HVVJzqMOI cHJvsewEPNb57FeJ4lnaBO0So57SdWp7wbcCi7XUP9iq9RWmPwnEg== X-ME-Sender: Received: from alvin.alvh.no-ip.org (unknown [179.56.51.182]) by mail.messagingengine.com (Postfix) with ESMTPA id BFD3710252; Sat, 7 Apr 2018 17:13:33 -0400 (EDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 784D933C; Sat, 7 Apr 2018 18:13:31 -0300 (-03) Date: Sat, 7 Apr 2018 18:13:31 -0300 From: Alvaro Herrera To: David Rowley Cc: Amit Langote , Amit Langote , Jesper Pedersen , Rajkumar Raghuwanshi , Beena Emerson , Robert Haas , amul sul , "pgsql-hackers@postgresql.org" , Dilip Kumar Subject: Re: [HACKERS] Runtime Partition Pruning Message-ID: <20180407211331.6idzpqp3wsusevwh@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I pushed this patch -- 0001, 0002 and 0003 only. I did not include anything from 0004 and 0005; I didn't even get to the point of reading them, so that I could focus on the first part. I did not find anything to complain about. I made a few adjustments and asked David to supply a paragraph for perform.sgml (the "Using EXPLAIN" section) which is included here. I also adopted Jesper's (actually David's) suggestion of changing "Partitions Pruned" to "Partitions Removed" in the EXPLAIN output. I had reservations about a relation_open() in the new executor code. It seemed a bit odd; we don't have any other relation_open in the executor anywhere. However, setting up the pruneinfo needs some stuff from relcache that I don't see a reasonable mechanism to pass through planner. I asked Andres about it on IM and while he didn't endorse the patch in any way, his quick opinion was that "it wasn't entirely insane". I verified that we already hold lock on the relation. While we didn't get fast pruning support for MergeAppend or the DELETE/UPDATE parts, I think those are valuable and recommend to resubmit those for PG12. Thank you! -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services