summaryrefslogtreecommitdiff
path: root/src/include/gtm/gtm_conn.h
blob: 1dfbdcf2b6cf2e3426df41059f695ad921f5bca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*-------------------------------------------------------------------------
 *
 * gtm_conn.h
 *
 *
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 * Portions Copyright (c) 2010-2012 Postgres-XC Development Group
 *
 * $PostgreSQL$
 *
 *-------------------------------------------------------------------------
 */
#ifndef GTM_CONN_H
#define GTM_CONN_H

#include "gtm/libpq-be.h"
#include "gtm/libpq-fe.h"
#include "gtm/libpq-int.h"

struct GTM_ThreadInfo;

typedef struct GTM_ConnectionInfo
{
	/* Port contains all the vital information about this connection */
	Port					*con_port;
	struct GTM_ThreadInfo	*con_thrinfo;
	bool					con_authenticated;

	/* a connection object to the standby */
	GTM_Conn				*standby;
} GTM_ConnectionInfo;

typedef struct GTM_Connections
{
	uint32				gc_conn_count;
	uint32				gc_array_size;
	GTM_ConnectionInfo	*gc_connections;
	GTM_RWLock			gc_lock;
} GTM_Connections;


#endif