We don't yet support persistent connections between datanodes
authorPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 19 Jan 2016 10:50:40 +0000 (16:20 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 18 Oct 2016 09:42:41 +0000 (15:12 +0530)
src/backend/pgxc/pool/poolmgr.c
src/backend/utils/misc/guc.c
src/include/pgxc/poolmgr.h

index 30dd985b2a2bd4a3d441e833493a976733d1c65b..fb07018500308597b96551d987a9d4c551d6bb0b 100644 (file)
@@ -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;
+}
index 0101f4b6ef0cf8b59c6e33a4481a902c16ae47e8..fdbec28a80c8bdfc928a93374762571eb20f2057 100644 (file)
@@ -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,
index 5f13490503986a480e170e3076b087d0c09cd1df..38d45cf2554ab275658401a1dab3d09613a6cf39 100644 (file)
@@ -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