PlaceHolderVars in pushed down child-join cause error

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема PlaceHolderVars in pushed down child-join cause error
Дата
Msg-id CAFjFpRf=J_KPOtw+bhZeURYkbizr8ufSaXg6gPEF6DKpgH-t6g@mail.gmail.com
обсуждение исходный текст
Ответы Re: PlaceHolderVars in pushed down child-join cause error
Список pgsql-hackers
Hi,
postgres_fdw isn't expected to push down joins with placeholder vars.
But the check for that in foreign_join_ok() only considers
joinrel->relids. For a child-join relids contains the child relids but
PlaceHolderInfo refers to the top parent's relids. Hence postgres_fdw
tries to push down a child-join with PlaceHolderVars in it and fails
with error "unsupported expression type for deparse: 198". 198 being
T_PlaceHolderVar.

The fix is to use joinrel->top_parent_relids for a child-join.
Attached patch for the same.

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] Runtime Partition Pruning
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [HACKERS] SERIALIZABLE with parallel query