diff --git a/contrib/postgres_fdw/connection.cpp b/contrib/postgres_fdw/connection.cpp index 9ed2b22c3..0432a9d21 100644 --- a/contrib/postgres_fdw/connection.cpp +++ b/contrib/postgres_fdw/connection.cpp @@ -795,6 +795,16 @@ static void pgfdw_xact_callback(XactEvent event, void *arg) return; } +#ifdef ENABLE_MOT + /* + * These events are added only for MOT FDW. So, others can safely ignore these event. + */ + if (event == XACT_EVENT_START || event == XACT_EVENT_RECORD_COMMIT || event == XACT_EVENT_PREROLLBACK_CLEANUP || + event == XACT_EVENT_POST_COMMIT_CLEANUP || event == XACT_EVENT_STMT_FINISH) { + return; + } +#endif + /* * Scan all connection cache entries to find open remote transactions, and * close them.