diff --git a/fdw/pxf_fdw.c b/fdw/pxf_fdw.c index 674d9da627..830dd66109 100644 --- a/fdw/pxf_fdw.c +++ b/fdw/pxf_fdw.c @@ -610,6 +610,18 @@ pxfBeginForeignModify(ModifyTableState *mtstate, * external resource in the QD node, when all the actual insertions happen * in the segments. */ + /* begin of temp block */ + /* + * Previously, ri_FdwState initialized here, but not in + * pxfExecForeignInsert(). This was optimized, but unfortunately, there may + * be some external projects that depend on old behavior. Here we do a temp + * fix, which restores old behavior. + */ + if (eflags & EXEC_FLAG_EXPLAIN_ONLY) + return; + if (!resultRelInfo->ri_FdwState) + resultRelInfo->ri_FdwState = InitForeignModify(resultRelInfo->ri_RelationDesc); + /* end of temp block */ } /*