postgres/contrib/postgres_fdw
Tom Lane 0bb28ca36e Fix hashjoin costing mistake introduced with inner_unique optimization.
In final_cost_hashjoin(), commit 9c7f5229a allowed inner_unique cases
to follow a code path previously used only for SEMI/ANTI joins; but it
neglected to fix an if-test within that path that assumed SEMI and ANTI
were the only possible cases.  This resulted in a wrong value for
hashjointuples, and an ensuing bad cost estimate, for inner_unique normal
joins.  Fortunately, for inner_unique normal joins we can assume the number
of joined tuples is the same as for a SEMI join; so there's no need for
more code, we just have to invert the test to check for ANTI not SEMI.

It turns out that in two contrib tests in which commit 9c7f5229a
changed the plan expected for a query, the change was actually wrong
and induced by this estimation error, not by any real improvement.
Hence this patch also reverts those changes.

Per report from RK Korlapati.  Backpatch to v10 where the error was
introduced.

David Rowley

Discussion: https://postgr.es/m/CA+SNy03bhq0fodsfOkeWDCreNjJVjsdHwUsb7AG=jpe0PtZc_g@mail.gmail.com
2018-07-14 11:59:12 -04:00
..
expected Fix hashjoin costing mistake introduced with inner_unique optimization. 2018-07-14 11:59:12 -04:00
sql Fix test case for 'outer pathkeys do not match mergeclauses' fix. 2018-01-30 14:47:02 -05:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
connection.c Re-establish postgres_fdw connections after server or user mapping changes. 2017-07-21 12:51:38 -04:00
deparse.c Fix postgres_fdw to cope with duplicate GROUP BY entries. 2018-01-12 16:52:49 -05:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
option.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c Change more places to be less trusting of RestrictInfo.is_pushed_down. 2018-04-20 15:19:16 -04:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h postgres_fdw: Move function prototype to correct section. 2017-06-22 12:44:53 -04:00
shippable.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00