summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Deolasee2016-01-19 10:50:40 +0000
committerPavan Deolasee2016-10-18 09:42:41 +0000
commit17c4a4118f192a4d4d814583196a67f3aeb2e8b7 (patch)
tree42cf3d41b421bb792e2ed1bf52cf6691debc2de5
parent9eab425d09678d9e12774cf7df35645ae8ce73f1 (diff)
We don't yet support persistent connections between datanodes
-rw-r--r--src/backend/pgxc/pool/poolmgr.c12
-rw-r--r--src/backend/utils/misc/guc.c2
-rw-r--r--src/include/pgxc/poolmgr.h4
3 files changed, 17 insertions, 1 deletions
diff --git a/src/backend/pgxc/pool/poolmgr.c b/src/backend/pgxc/pool/poolmgr.c
index 30dd985b2a..fb07018500 100644
--- a/src/backend/pgxc/pool/poolmgr.c
+++ b/src/backend/pgxc/pool/poolmgr.c
@@ -2650,3 +2650,15 @@ pools_maintenance(void)
elog(DEBUG1, "Pool maintenance, done in %f seconds, removed %d pools",
difftime(time(NULL), now), count);
}
+
+bool
+check_persistent_connections(bool *newval, void **extra, GucSource source)
+{
+ if (*newval && IS_PGXC_DATANODE)
+ {
+ elog(WARNING, "persistent_datanode_connections = ON is currently not "
+ "supported on datanodes - ignoring");
+ *newval = false;
+ }
+ return true;
+}
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 0101f4b6ef..fdbec28a80 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1723,7 +1723,7 @@ static struct config_bool ConfigureNamesBool[] =
},
&PersistentConnections,
false,
- NULL, NULL, NULL
+ check_persistent_connections, NULL, NULL
},
{
{"strict_statement_checking", PGC_USERSET, DEVELOPER_OPTIONS,
diff --git a/src/include/pgxc/poolmgr.h b/src/include/pgxc/poolmgr.h
index 5f13490503..38d45cf255 100644
--- a/src/include/pgxc/poolmgr.h
+++ b/src/include/pgxc/poolmgr.h
@@ -25,6 +25,7 @@
#include "pgxcnode.h"
#include "poolcomm.h"
#include "storage/pmsignal.h"
+#include "utils/guc.h"
#include "utils/hsearch.h"
#define MAX_IDLE_TIME 60
@@ -141,4 +142,7 @@ extern void PoolManagerLock(bool is_lock);
/* Do pool health check activity */
extern void PoolPingNodes(void);
+
+extern bool check_persistent_connections(bool *newval, void **extra,
+ GucSource source);
#endif