pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Disable asynchronous execution if using gating Result nodes. 2+ messages / 1 participants [nested] [flat]
* pgsql: Disable asynchronous execution if using gating Result nodes. @ 2022-04-28 06:27 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Etsuro Fujita @ 2022-04-28 06:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disable asynchronous execution if using gating Result nodes. mark_async_capable_plan(), which is called from create_append_plan() to determine whether subplans are async-capable, failed to take into account that the given subplan created from a given subpath might include a gating Result node if the subpath is a SubqueryScanPath or ForeignPath, causing a segmentation fault there when the subplan created from a SubqueryScanPath includes the Result node, or causing ExecAsyncRequest() to throw an error about an unrecognized node type when the subplan created from a ForeignPath includes the Result node, because in the latter case the Result node was unintentionally considered as async-capable, but we don't currently support executing Result nodes asynchronously. Fix by modifying mark_async_capable_plan() to disable asynchronous execution in such cases. Also, adjust code in the ProjectionPath case in mark_async_capable_plan(), for consistency with other cases, and adjust/improve comments there. is_async_capable_path() added in commit 27e1f1456, which was rewritten to mark_async_capable_plan() in a later commit, has the same issue, causing the error at execution mentioned above, so back-patch to v14 where the aforesaid commit went in. Per report from Justin Pryzby. Etsuro Fujita, reviewed by Zhihong Yu and Justin Pryzby. Discussion: https://postgr.es/m/20220408124338.GK24419%40telsasoft.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5c854e7a2c8a6cd26040e0f9949e7a4a007f6366 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 66 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 13 +++++ src/backend/optimizer/plan/createplan.c | 34 ++++++++++--- 3 files changed, 106 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Disable asynchronous execution if using gating Result nodes. @ 2022-04-28 06:27 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Etsuro Fujita @ 2022-04-28 06:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disable asynchronous execution if using gating Result nodes. mark_async_capable_plan(), which is called from create_append_plan() to determine whether subplans are async-capable, failed to take into account that the given subplan created from a given subpath might include a gating Result node if the subpath is a SubqueryScanPath or ForeignPath, causing a segmentation fault there when the subplan created from a SubqueryScanPath includes the Result node, or causing ExecAsyncRequest() to throw an error about an unrecognized node type when the subplan created from a ForeignPath includes the Result node, because in the latter case the Result node was unintentionally considered as async-capable, but we don't currently support executing Result nodes asynchronously. Fix by modifying mark_async_capable_plan() to disable asynchronous execution in such cases. Also, adjust code in the ProjectionPath case in mark_async_capable_plan(), for consistency with other cases, and adjust/improve comments there. is_async_capable_path() added in commit 27e1f1456, which was rewritten to mark_async_capable_plan() in a later commit, has the same issue, causing the error at execution mentioned above, so back-patch to v14 where the aforesaid commit went in. Per report from Justin Pryzby. Etsuro Fujita, reviewed by Zhihong Yu and Justin Pryzby. Discussion: https://postgr.es/m/20220408124338.GK24419%40telsasoft.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ebb79024152348227250404fd06c35c56cbc672e Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 26 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 5 +++++ src/backend/optimizer/plan/createplan.c | 19 +++++++++++++------ 3 files changed, 44 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-04-28 06:27 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-04-28 06:27 pgsql: Disable asynchronous execution if using gating Result nodes. Etsuro Fujita <efujita@postgresql.org> 2022-04-28 06:27 pgsql: Disable asynchronous execution if using gating Result nodes. Etsuro Fujita <efujita@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox