]> granicus.if.org Git - postgresql/commit
postgres_fdw: Account for tlist eval costs in estimate_path_cost_size().
authorEtsuro Fujita <efujita@postgresql.org>
Thu, 24 Jan 2019 07:49:17 +0000 (16:49 +0900)
committerEtsuro Fujita <efujita@postgresql.org>
Thu, 24 Jan 2019 07:49:17 +0000 (16:49 +0900)
commitfd1afdbafd4fbb0ce23a3f319adc177e4cf8fe99
tree7898d6787e76994d8b57f0f681ef4a882da20433
parent2cf91ccb73ce888c44e3751548fb7c77e87335f2
postgres_fdw: Account for tlist eval costs in estimate_path_cost_size().

Previously, estimate_path_cost_size() didn't account for tlist eval
costs, except when costing a foreign-grouping path using local
statistics, but such costs should be accounted for when costing that path
using remote estimates, because some of the tlist expressions might be
evaluated locally.  Also, such costs should be accounted for in the case
of a foreign-scan or foreign-join path, because the tlist might contain
PlaceHolderVars, which postgres_fdw currently evaluates locally.

This also fixes an oversight in my commit f8f6e44676.

Like that commit, apply this to HEAD only to avoid destabilizing existing
plan choices.

Author: Etsuro Fujita
Discussion: https://postgr.es/m/5BFD3EAD.2060301%40lab.ntt.co.jp
contrib/postgres_fdw/postgres_fdw.c