Re: [HACKERS] Rowcounts marked by create_foreignscan_path()

2014-03-06 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Maybe I'm missing something. But I don't think postgresGetForeignPaths() marks the parameterized path with the correct row estimate. Also, that function doesn't seem to estimate the cost of the parameterized path correctly. Please find

Re: [HACKERS] Rowcounts marked by create_foreignscan_path()

2014-03-03 Thread Etsuro Fujita
(2014/02/18 12:37), Tom Lane wrote: Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: (2014/02/18 12:03), Tom Lane wrote: The calling FDW is supposed to do that; note the header comment. However, ISTM postgresGetForeignPaths() doesn't work like that. It uses the same rowcount for all paths

[HACKERS] Rowcounts marked by create_foreignscan_path()

2014-02-17 Thread Etsuro Fujita
Why does create_foreignscan_path() not set the rowcounts based on ParamPathInfo when the path is a parameterized path? Please find attached a patch. Thanks, Best regards, Etsuro Fujita *** a/src/backend/optimizer/util/pathnode.c --- b/src/backend/optimizer/util/pathnode.c *** ***

Re: [HACKERS] Rowcounts marked by create_foreignscan_path()

2014-02-17 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Why does create_foreignscan_path() not set the rowcounts based on ParamPathInfo when the path is a parameterized path? The calling FDW is supposed to do that; note the header comment. I'm not sure that it'd be an improvement to change the API

Re: [HACKERS] Rowcounts marked by create_foreignscan_path()

2014-02-17 Thread Etsuro Fujita
(2014/02/18 12:03), Tom Lane wrote: Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Why does create_foreignscan_path() not set the rowcounts based on ParamPathInfo when the path is a parameterized path? The calling FDW is supposed to do that; note the header comment. Understood. However,

Re: [HACKERS] Rowcounts marked by create_foreignscan_path()

2014-02-17 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: (2014/02/18 12:03), Tom Lane wrote: The calling FDW is supposed to do that; note the header comment. Understood. However, ISTM postgresGetForeignPaths() doesn't work like that. It uses the same rowcount for all paths of a same