pgsql: Pass the correct PlannerInfo toPlanForeignModify/PlanDirectModi

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Pass the correct PlannerInfo toPlanForeignModify/PlanDirectModi
Дата
Msg-id E1fIz4b-0002PB-ST@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Pass the correct PlannerInfo to PlanForeignModify/PlanDirectModify.

Previously, we passed the toplevel PlannerInfo, but we actually want
to pass the relevant subroot.  One problem with passing the toplevel
PlannerInfo is that the FDW which wants to push down an UPDATE or
DELETE against a join won't find the relevant joinrel there.
As of commit 1bc0100d270e5bcc980a0629b8726a32a497e788, postgres_fdw
tries to do exactly this and can be made to fail an assertion as a
result.

It's possible that this should be regarded as a bug fix and
back-patched to earlier releases, but for lack of a test case that
fails in earlier releases, no back-patch for now.

Etsuro Fujita, reviewed by Amit Langote.

Discussion: http://postgr.es/m/5AF43E02.30000@lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7fc7dac1a711d0dbd01d2daf6dc97d27d6c6409c

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 75 ++++++++++++++++++++++++++
contrib/postgres_fdw/sql/postgres_fdw.sql      | 32 +++++++++++
src/backend/optimizer/plan/createplan.c        | 24 +++++----
3 files changed, 121 insertions(+), 10 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Improve comment in get_partition_dispatch_recurse.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix misprocessing of equivalence classes involving record_eq().