diff options
author | Tomas Vondra | 2017-11-04 14:52:13 +0000 |
---|---|---|
committer | Tomas Vondra | 2017-11-04 16:23:11 +0000 |
commit | a59901be0f488c2071aea53e3f6d3f2eb9a86f03 (patch) | |
tree | 798738619bfcd3f3fb5d2b8a394dc28bf6b107ba /src/include | |
parent | d9f45c9018ec3ec1fc11e4be2be7f9728a1799b1 (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.h | 12 | ||||
-rw-r--r-- | src/include/pgxc/poolmgr.h | 4 |
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). * |