Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAOQ5-0006lr-QE for pgsql-performance@arkaria.postgresql.org; Mon, 15 May 2017 22:24:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dAOQ4-0006us-Sv for pgsql-performance@arkaria.postgresql.org; Mon, 15 May 2017 22:24:48 +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 1dAOOK-0003pX-7q for pgsql-performance@postgresql.org; Mon, 15 May 2017 22:23:00 +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 1dAOOA-0007Hm-Lx for pgsql-performance@postgresql.org; Mon, 15 May 2017 22:22:59 +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 v4FMMmr4022432; Mon, 15 May 2017 18:22:48 -0400 From: Tom Lane To: Jeff Janes cc: "pgsql-performance@postgresql.org" Subject: Re: postgres_fdw and column casting shippability In-reply-to: References: Comments: In-reply-to Jeff Janes message dated "Mon, 15 May 2017 14:42:14 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22430.1494886968.1@sss.pgh.pa.us> Date: Mon, 15 May 2017 18:22:48 -0400 Message-ID: <22431.1494886968@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-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Jeff Janes writes: > I've tried versions 9.6.3 and 10dev, and neither do what I expected. It > doesn't seem to be a planning problem where it thinks the fast plan is > slower, it just doesn't seem to consider the faster plans as being options > at all. Is there some setting to make it realize the cast is shippable? AFAICS, postgres_fdw doesn't have any knowledge of CoerceViaIO parse nodes, so it's never going to consider this type of brute-force cast as shippable. Normal casts would presumably be shippable if the underlying function is considered safe. Looks like a round-tuit-shortage issue rather than anything fundamental. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance