summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTomas Vondra2017-11-04 14:52:13 +0000
committerTomas Vondra2017-11-04 16:23:11 +0000
commita59901be0f488c2071aea53e3f6d3f2eb9a86f03 (patch)
tree798738619bfcd3f3fb5d2b8a394dc28bf6b107ba /src/include
parentd9f45c9018ec3ec1fc11e4be2be7f9728a1799b1 (diff)
Move several functions from pgxcnode.c to poolmgr.c
A number of functions were defined in pgxcnode.h/pgxnnode.h, but only ever used in poolmgr.c. Those are: - PGXCNodeConnect - open libpq connection using conn. string - PGXCNodePing - ping node using connection string - PGXCNodeClose - close libpq connection - PGXCNodeConnected - verify connection status - PGXCNodeConnStr - build connection string So move them to poolmgr.c and make them static, so that poolmgr is the only part dealing with libpq connections directly.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pgxc/pgxcnode.h12
-rw-r--r--src/include/pgxc/poolmgr.h4
2 files changed, 4 insertions, 12 deletions
diff --git a/src/include/pgxc/pgxcnode.h b/src/include/pgxc/pgxcnode.h
index 13b52e802c..9f002ce3c3 100644
--- a/src/include/pgxc/pgxcnode.h
+++ b/src/include/pgxc/pgxcnode.h
@@ -25,10 +25,6 @@
#define NO_SOCKET -1
-/* Connection to Datanode maintained by Pool Manager */
-typedef struct PGconn NODE_CONNECTION;
-typedef struct PGcancel NODE_CANCEL;
-
/* Helper structure to access Datanode from Session */
typedef enum
{
@@ -113,15 +109,7 @@ typedef struct
extern void InitMultinodeExecutor(bool is_force);
/* Open/close connection routines (invoked from Pool Manager) */
-extern char *PGXCNodeConnStr(char *host, int port, char *dbname, char *user,
- char *pgoptions,
- char *remote_type, char *parent_node);
-extern NODE_CONNECTION *PGXCNodeConnect(char *connstr);
-extern void PGXCNodeClose(NODE_CONNECTION * conn);
-extern int PGXCNodeConnected(NODE_CONNECTION * conn);
-extern int PGXCNodeConnClean(NODE_CONNECTION * conn);
extern void PGXCNodeCleanAndRelease(int code, Datum arg);
-extern int PGXCNodePing(const char *connstr);
extern PGXCNodeHandle *get_any_handle(List *datanodelist);
/* Look at information cached in node handles */
diff --git a/src/include/pgxc/poolmgr.h b/src/include/pgxc/poolmgr.h
index 3c2d1f4eb2..c7f9343393 100644
--- a/src/include/pgxc/poolmgr.h
+++ b/src/include/pgxc/poolmgr.h
@@ -35,6 +35,10 @@
#define MAX_IDLE_TIME 60
+/* Connection to nodes maintained by Pool Manager */
+typedef struct PGconn NODE_CONNECTION;
+typedef struct PGcancel NODE_CANCEL;
+
/*
* One connection in the pool (to datanode or coordinator).
*