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 1f5bpv-0001Gx-LY for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Apr 2018 18:48:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5bpu-0004pV-HN for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Apr 2018 18:48:14 +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 1f5bps-0004dv-UP for pgsql-hackers@lists.postgresql.org; Mon, 09 Apr 2018 18:48:13 +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 1f5bpp-0003aQ-AK for pgsql-hackers@postgresql.org; Mon, 09 Apr 2018 18:48:12 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id DE46A2A4; Mon, 9 Apr 2018 14:48:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 09 Apr 2018 14:48:07 -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=ALZoRzdBkc0uVx7Fm dSwvqep0p+cSRBnBQiu6wCt1Bs=; b=dKFtZjZfP9Iv28RpXdEWnVW83Wa9u2eBs 8P+dqY2jW3gGu8UbhbOvYPqNErmYHKbDcMSmxJ+dosvhmWhPq0FqixvYZS0NJa2n T7UCKzLZv7I218J47yKUZq8hlfcgoU/cWbCzlP4XAluKDCHXK8fEaDTejzeOR59u 7qig1ovP3WwFqOIFcqbo1uDggwCiX4nkp16ZBKbJpQgUbSmu6XGAAFNFSlC7PNOA Bflmsiv3MsRO6k89Nh03vNz5nOpVsyAGsaMWIeUXBdnzI87IhdcX6g/AzMarCkt+ uJi3eijuWSdJUMXLFH8B058+CjjIoleSAoox3FkQEsElEklb5HsqA== X-ME-Sender: Received: from alvin.alvh.no-ip.org (unknown [179.56.29.253]) by mail.messagingengine.com (Postfix) with ESMTPA id 2862F10255; Mon, 9 Apr 2018 14:48:07 -0400 (EDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4FEAC366; Mon, 9 Apr 2018 15:48:05 -0300 (-03) Date: Mon, 9 Apr 2018 15:48:05 -0300 From: Alvaro Herrera To: Robert Haas Cc: David Rowley , Amit Langote , Amit Langote , Jesper Pedersen , Rajkumar Raghuwanshi , Beena Emerson , amul sul , "pgsql-hackers@postgresql.org" , Dilip Kumar Subject: Re: [HACKERS] Runtime Partition Pruning Message-ID: <20180409184805.ieucnlxwnwr2mprt@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 Robert Haas wrote: > On Mon, Apr 9, 2018 at 2:28 PM, Alvaro Herrera wrote: > > Robert Haas wrote: > >> I don't get this. The executor surely had to (and did) open all of > >> the relations somewhere even before this patch. > > > > I was worried that this coding could be seen as breaking modularity, or > > trying to do excessive work. However, after looking closer at it, it > > doesn't really look like it's the case. So, nevermind. > > Well what I'm saying is that it shouldn't be necessary. If the > relations are being opened already and the pointers to the relcache > entries are being saved someplace, you shouldn't need to re-open them > elsewhere to get pointers to the relcache entries. Oh, okay. I can look into that. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services