Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cy2sM-0003jk-6S for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Apr 2017 20:58:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cy2sL-0003Q9-8M for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Apr 2017 20:58:57 +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.84_2) (envelope-from ) id 1cy2sK-0003Pz-H3 for pgsql-hackers@postgresql.org; Tue, 11 Apr 2017 20:58:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cy2sI-0007OK-2P for pgsql-hackers@postgresql.org; Tue, 11 Apr 2017 20:58:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v3BKwn5f004510; Tue, 11 Apr 2017 16:58:50 -0400 From: Tom Lane To: Dmitry Ivanov cc: pgsql-hackers Subject: Re: Possible problem in Custom Scan API In-reply-to: References: <20021.1491933424@sss.pgh.pa.us> <1ef85b46-1385-4810-bb80-97cd977da1d5@postgrespro.ru> <367.1491940070@sss.pgh.pa.us> Comments: In-reply-to Dmitry Ivanov message dated "Tue, 11 Apr 2017 23:28:17 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4508.1491944329.1@sss.pgh.pa.us> Date: Tue, 11 Apr 2017 16:58:49 -0400 Message-ID: <4509.1491944329@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Dmitry Ivanov writes: >> Reading between the lines, I think the problem may be that you're not >> being careful about how you set up custom_scan_tlist. But since the >> core code has zero involvement in that decision, it's hard to see why >> it would be a core code bug. > I'm sorry, but you didn't understand. It's *the core code* that builds the > targetlist, and sometimes it may decide to provide a physical targetlist, > not the one that's *really needed*. Uh, no, construction of a custom plan node is entirely driven by the PlanCustomPath method as far as I can see. You're free to ignore what create_scan_plan did and insert your own tlist. In particular, if what your custom path actually is is a rescan of something like an IndexOnlyScan, why don't you just copy the IOS's result tlist? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers