forked from huawei/openGauss-server
!1046 Fixed the bug that a memory leak occurs when archiving is enabled on the standby node.
Merge pull request !1046 from Cross-罗/patch_branch
This commit is contained in:
commit
2f6663e0a8
|
|
@ -3031,6 +3031,8 @@ static void InitArchiveStartPoint()
|
|||
pfree(xlog_array);
|
||||
xlog_array = NULL;
|
||||
}
|
||||
FreeDir(xldir);
|
||||
xldir = NULL;
|
||||
}
|
||||
|
||||
static bool CheckXlogNameValid(char* xlog)
|
||||
|
|
|
|||
|
|
@ -3189,7 +3189,9 @@ static int WalSndLoop(WalSndSendDataCallback send_data)
|
|||
XLogRecPtr replayPtr;
|
||||
bool amSync = false;
|
||||
bool got_recptr = false;
|
||||
int standby_nums = list_length(SyncRepGetSyncStandbys(&amSync));
|
||||
List* sync_standbys = SyncRepGetSyncStandbys(&amSync);
|
||||
int standby_nums = list_length(sync_standbys);
|
||||
list_free(sync_standbys);
|
||||
got_recptr = SyncRepGetSyncRecPtr(&receivePtr, &writePtr, &flushPtr, &replayPtr, &amSync, false);
|
||||
if (got_recptr) {
|
||||
ArchiveXlogOnStandby(flushPtr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue