From 5575fe4a2e08056b1dc8ebd7e03d2ee4ae98e4fd Mon Sep 17 00:00:00 2001 From: gentle_hu Date: Mon, 12 Dec 2022 11:31:21 +0800 Subject: [PATCH] =?UTF-8?q?pgfdw=E5=86=85=E8=A1=A5=E5=85=85mot=E7=9A=84?= =?UTF-8?q?=E4=BA=8B=E5=8A=A1=E5=9B=9E=E8=B0=83=E5=BF=BD=E7=95=A5=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contrib/postgres_fdw/connection.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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.