mirror of
https://gitee.com/he3db/he3pg.git
synced 2024-12-02 04:07:34 +08:00
slave replay
Code Source From: Self Code Description: [Optional] Jira: #[Optional] 市场项目编号(名称):[Optional]
This commit is contained in:
parent
37ec5b24b4
commit
e24c4f6fc9
@ -396,7 +396,7 @@ CleanLogIndexMain(int argc, char *argv[])
|
||||
int hasData = 0;
|
||||
|
||||
pushStandbyPrePoint = pushStandbyPoint;
|
||||
if (push_standby == true||EnableHotStandby == false) {
|
||||
if (push_standby == true || EnableHotStandby == false) {
|
||||
pushStandbyPoint = GetXLogPushToDisk();
|
||||
if (pushStandbyPrePoint < pushStandbyPoint) {
|
||||
hasData++;
|
||||
|
@ -5965,12 +5965,14 @@ ReadRecord(XLogReaderState *xlogreader, int emode,
|
||||
/* This is the first attempt to read this page. */
|
||||
lastSourceFailed = false;
|
||||
#ifndef PG_NOREPLAY
|
||||
if (push_standby == true && PushPtr == InvalidXLogRecPtr)
|
||||
if ((push_standby == true || EnableHotStandby == false) &&
|
||||
xlogreader->streamStart == true &&
|
||||
PushPtr == InvalidXLogRecPtr)
|
||||
{
|
||||
PushPtr = xlogreader->EndRecPtr;
|
||||
PrePushPtr = xlogreader->EndRecPtr;
|
||||
ApplyLsn = PrePushPtr;
|
||||
XLogCtl->pushToDisk = ApplyLsn;
|
||||
//XLogCtl->pushToDisk = ApplyLsn;
|
||||
}
|
||||
#endif
|
||||
for (;;)
|
||||
@ -12125,6 +12127,8 @@ void xlog_redo(XLogReaderState *record)
|
||||
{
|
||||
CheckPointPtr = record->currRecPtr;
|
||||
memcpy(&GlobalCheckPoint, XLogRecGetData(record), sizeof(CheckPoint));
|
||||
// for recover checkpoint must be flush disk,so set GlobalCheckPoint.redo = CheckPointPtr is ok
|
||||
GlobalCheckPoint.redo = CheckPointPtr;
|
||||
GlobalState = DB_IN_ARCHIVE_RECOVERY;
|
||||
}
|
||||
#endif
|
||||
|
@ -722,7 +722,7 @@ restart:
|
||||
#ifndef PG_NOREPLAY
|
||||
if (IsBootstrapProcessingMode() != true && InitdbSingle!=true) {
|
||||
if (getpid() == startupPid) {
|
||||
if (push_standby == true||EnableHotStandby == false) {
|
||||
if (push_standby == true || EnableHotStandby == false) {
|
||||
// Update shared-memory status
|
||||
XLogRecPtr prevPushPoint = PrePushPtr;
|
||||
if (!XLogRecPtrIsInvalid(CheckPointPtr)) {
|
||||
|
Loading…
Reference in New Issue
Block a user