blob: 0570b70d6dea65446b7800f928d78fae9f53c88b (
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
44
45
46
|
/*-------------------------------------------------------------------------
*
* poolutils.h
*
* Utilities for Postgres-XC Pooler
*
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
* Portions Copyright (c) 2010-2012 Postgres-XC Development Group
*
* src/include/pgxc/poolutils.h
*
*-------------------------------------------------------------------------
*/
#ifndef POOLUTILS_H
#define POOLUTILS_H
#include "nodes/parsenodes.h"
#define TIMEOUT_CLEAN_LOOP 10 /* Wait 10s for all the transactions to shutdown */
/* Error codes for connection cleaning */
#define CLEAN_CONNECTION_COMPLETED 0
#define CLEAN_CONNECTION_NOT_COMPLETED 1
#define CLEAN_CONNECTION_TX_REMAIN 2
#define CLEAN_CONNECTION_EOF -1
/* Results for query cancel */
#define QUERY_CANCEL_COMPLETED 0
/* Results for pooler connection info check */
#define POOL_CHECK_SUCCESS 0
#define POOL_CHECK_FAILED 1
/* Results for pooler connection info refresh */
#define POOL_REFRESH_SUCCESS 0
#define POOL_REFRESH_FAILED 1
void CleanConnection(CleanConnStmt *stmt);
void DropDBCleanConnection(char *dbname);
/* Handle pooler connection reload/refresh when signaled by SIGUSR1 */
void HandlePoolerReload(void);
void HandlePoolerRefresh(void);
bool PgxcNodeRefresh(void);
#endif
|