mirror of
https://gitee.com/he3db/he3pg.git
synced 2024-11-29 18:58:35 +08:00
Function declaration problem
Code Source From: Self Code Description: 【Optional】 Jira: #【Optional】 市场项目编号(名称):【Optional】
This commit is contained in:
parent
9ee3bdf853
commit
b1f7353e14
@ -47,18 +47,9 @@ pid_t startupPid = 0;
|
||||
// return true;
|
||||
|
||||
// }
|
||||
bool ReConnectPrimaryDB(void) {
|
||||
if (push_standby == true && pushconn!=NULL) {
|
||||
PQfinish(pushconn);
|
||||
pushconn = NULL;
|
||||
if (ConnectPrimaryDB() == true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
static bool ConnectPrimaryDB(void);
|
||||
|
||||
static bool ConnectPrimaryDB() {
|
||||
static bool ConnectPrimaryDB(void) {
|
||||
char *err;
|
||||
char conninfo[maxconnlen];
|
||||
// const char *keys[] = {"dbname","user","password","host","port",NULL};
|
||||
@ -83,6 +74,18 @@ static bool ConnectPrimaryDB() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReConnectPrimaryDB(void) {
|
||||
if (push_standby == true && pushconn!=NULL) {
|
||||
PQfinish(pushconn);
|
||||
pushconn = NULL;
|
||||
if (ConnectPrimaryDB() == true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// static bool ConnectPrimaryDB4ReplyLSN() {
|
||||
// char *err;
|
||||
// char conninfo[maxconnlen];
|
||||
|
Loading…
Reference in New Issue
Block a user