change var lastFlushPosition set location

This commit is contained in:
movead
2023-02-13 12:01:29 +08:00
parent 5371d0d06b
commit fde67e6c8b

View File

@ -494,12 +494,12 @@ static int DoWALWrite(const char* wal_buf, int len, XLogRecPtr& block_pos, const
suspendHeartBeatTimer();
return DO_WAL_DATA_WRITE_ERROR;
}
lastFlushPosition = block_pos;
/* Write was successful, advance our position */
bytes_written += bytes_to_write;
bytes_left -= bytes_to_write;
XLByteAdvance(block_pos, bytes_to_write);
xlogoff += bytes_to_write;
lastFlushPosition = block_pos;
/* Did we reach the end of a WAL segment? */
if (block_pos % XLogSegSize == 0) {