Skip to content

Commit 449d0a8

Browse files
author
Etsuro Fujita
committed
postgres_fdw: Fix test for cached costs in estimate_path_cost_size().
estimate_path_cost_size() failed to re-use cached costs when the cached startup/total cost was 0, so it calculated the costs redundantly. This is an oversight in commit aa09cd2; but apply the patch to HEAD only because there are no reports of actual trouble from that. Author: Etsuro Fujita Discussion: https://postgr.es/m/5C4AF3F3.4060409%40lab.ntt.co.jp
1 parent e0c2933 commit 449d0a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2625,7 +2625,7 @@ estimate_path_cost_size(PlannerInfo *root,
26252625
* bare scan each time. Instead, use the costs if we have cached them
26262626
* already.
26272627
*/
2628-
if (fpinfo->rel_startup_cost > 0 && fpinfo->rel_total_cost > 0)
2628+
if (fpinfo->rel_startup_cost >= 0 && fpinfo->rel_total_cost >= 0)
26292629
{
26302630
startup_cost = fpinfo->rel_startup_cost;
26312631
run_cost = fpinfo->rel_total_cost - fpinfo->rel_startup_cost;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy