postgresql/contrib/postgres_fdw
Etsuro Fujita 69f75bf825 postgres_fdw: Fix assertion in estimate_path_cost_size().
Commit 08d2d58a2 added this assertion assuming that the retrieved_rows
estimate for a foreign relation is set to at least one row in
estimate_path_cost_size(), but the assumption isn't correct because if
the relation is a foreign table with tuples=0, the estimate would be set
to 0 in there when using local stats, and if the query's WHERE clause
has a NULL condition, the estimate could be set to 0 in there when using
remote estimates.  (Note: even in the latter case the assertion could be
reachable when costing foreign final paths.)  Repair.

Per bug #17713 from Robins Tharakan.  This patch was already applied to
v13 or later; apply it to v12 as well where the aforementioned commit
was added.  Thanks to Richard Guo for investigation.

Discussion: http://postgr.es/m/17713-92cce66de7e81c04%40postgresql.org
Discussion: http://postgr.es/m/CAEP4nAza%2B0fTCLkgkKYux3JDo3tUBTQORehP%2BaCxSNURpSFpHw%40mail.gmail.com
2022-12-15 21:15:00 +09:00
..
expected postgres_fdw: Fix assertion in estimate_path_cost_size(). 2022-12-15 21:15:00 +09:00
sql postgres_fdw: Fix assertion in estimate_path_cost_size(). 2022-12-15 21:15:00 +09:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
connection.c postgres_fdw: Fix unexpected reporting of empty message. 2021-12-03 17:37:19 +09:00
deparse.c Fix postgres_fdw to check shippability of sort clauses properly. 2022-03-31 14:29:24 -04:00
option.c Avoid using ambiguous word "non-negative" in error messages. 2021-07-28 01:24:24 +09:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c postgres_fdw: Fix assertion in estimate_path_cost_size(). 2022-12-15 21:15:00 +09:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h Fix postgres_fdw to check shippability of sort clauses properly. 2022-03-31 14:29:24 -04:00
shippable.c Update copyright for 2019 2019-01-02 12:44:25 -05:00