解决编译告警问题
This commit is contained in:
@ -2478,9 +2478,6 @@ static bool XLogArchiveCheckDone(const char *xlog)
|
||||
static bool HasBeenArchivedOnHaMode(const char* xlog)
|
||||
{
|
||||
load_server_mode();
|
||||
if (!t_thrd.xlog_cxt.server_mode == PRIMARY_MODE && !t_thrd.xlog_cxt.server_mode == STANDBY_MODE) {
|
||||
return true;
|
||||
}
|
||||
int mode = t_thrd.xlog_cxt.server_mode;
|
||||
XLogRecPtr minium_lsn = PG_UINT64_MAX;
|
||||
for (int i = 0; mode == PRIMARY_MODE && i < g_instance.attr.attr_storage.max_wal_senders; i++) {
|
||||
|
||||
@ -140,8 +140,6 @@ static void XLogWalRcvWrite(WalRcvCtlBlock *walrcb, char *buf, Size nbytes, XLog
|
||||
* would otherwise have to reopen this file to fsync it later
|
||||
*/
|
||||
if (recvFile >= 0) {
|
||||
char xlogfname[MAXFNAMELEN];
|
||||
|
||||
/*
|
||||
* XLOG segment files will be re-read by recovery in startup
|
||||
* process soon, so we don't advise the OS to release cache
|
||||
@ -157,6 +155,7 @@ static void XLogWalRcvWrite(WalRcvCtlBlock *walrcb, char *buf, Size nbytes, XLog
|
||||
* Create .done file forcibly to prevent the restored segment from
|
||||
* being archived again later.
|
||||
*/
|
||||
char xlogfname[MAXFNAMELEN];
|
||||
XLogFileName(xlogfname, recvFileTLI, recvSegNo);
|
||||
XLogArchiveForceDone(xlogfname);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user