From 785faf8914ed1ac862316cc87dee8b1e3f4df171 Mon Sep 17 00:00:00 2001 From: movead Date: Fri, 9 Apr 2021 11:32:29 +0800 Subject: [PATCH] add THR_LOCAL for global var --- contrib/dblink/dblink.cpp | 4 ++-- src/test/regress/parallel_schedule0 | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/dblink/dblink.cpp b/contrib/dblink/dblink.cpp index 6598bc845..5fddfe4eb 100755 --- a/contrib/dblink/dblink.cpp +++ b/contrib/dblink/dblink.cpp @@ -112,8 +112,8 @@ static int applyRemoteGucs(PGconn* conn); static void restoreLocalGucs(int nestlevel); /* Global */ -static remoteConn* pconn = NULL; -static HTAB* remoteConnHash = NULL; +static THR_LOCAL remoteConn* pconn = NULL; +static THR_LOCAL HTAB* remoteConnHash = NULL; /* * Following is list that holds multiple remote connections. diff --git a/src/test/regress/parallel_schedule0 b/src/test/regress/parallel_schedule0 index 5daeb6505..337ee3af9 100644 --- a/src/test/regress/parallel_schedule0 +++ b/src/test/regress/parallel_schedule0 @@ -5,7 +5,6 @@ # this limits the number of connections needed to run the tests. # ---------- -test: dblink test: analyze_commands #test: single_node_job test: single_node_ddl @@ -761,3 +760,6 @@ test: leaky_function_operator #test: gs_guc test: smp + +# dblink contrib test +test: dblink