postgresql/contrib/postgres_fdw
Tom Lane 1007b0a126 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 WITH CHECK OPTION on views referencing postgres_fdw tables. 2018-07-08 16:53:36 -07:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
connection.c Improve style guideline compliance of assorted error-report messages. 2018-03-22 17:33:10 -04:00
deparse.c Fix WITH CHECK OPTION on views referencing postgres_fdw tables. 2018-07-08 16:53:36 -07:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
option.c Improve style guideline compliance of assorted error-report messages. 2018-03-22 17:33:10 -04:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c Fix WITH CHECK OPTION on views referencing postgres_fdw tables. 2018-07-08 16:53:36 -07:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h Fix WITH CHECK OPTION on views referencing postgres_fdw tables. 2018-07-08 16:53:36 -07:00
shippable.c Update copyright for 2018 2018-01-02 23:30:12 -05:00