Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit24eca79

Browse files
committed
Assign InvalidXLogRecPtr instead of MemSet(0)
For consistency.Author: Andres Freund
1 parenteaa1f72 commit24eca79

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6393,8 +6393,8 @@ CheckRecoveryConsistency(void)
63936393
if (XLByteLT(ControlFile->minRecoveryPoint,EndRecPtr))
63946394
ControlFile->minRecoveryPoint=EndRecPtr;
63956395

6396-
MemSet(&ControlFile->backupStartPoint,0,sizeof(XLogRecPtr));
6397-
MemSet(&ControlFile->backupEndPoint,0,sizeof(XLogRecPtr));
6396+
ControlFile->backupStartPoint=InvalidXLogRecPtr;
6397+
ControlFile->backupEndPoint=InvalidXLogRecPtr;
63986398
ControlFile->backupEndRequired= false;
63996399
UpdateControlFile();
64006400

@@ -7330,7 +7330,7 @@ CreateCheckPoint(int flags)
73307330
ControlFile->checkPointCopy=checkPoint;
73317331
ControlFile->time= (pg_time_t)time(NULL);
73327332
/* crash recovery should always recover to the end of WAL */
7333-
MemSet(&ControlFile->minRecoveryPoint,0,sizeof(XLogRecPtr));
7333+
ControlFile->minRecoveryPoint=InvalidXLogRecPtr;
73347334
ControlFile->minRecoveryPointTLI=0;
73357335
UpdateControlFile();
73367336
LWLockRelease(ControlFileLock);
@@ -8161,7 +8161,7 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
81618161
ControlFile->minRecoveryPoint=lsn;
81628162
ControlFile->minRecoveryPointTLI=ThisTimeLineID;
81638163
}
8164-
MemSet(&ControlFile->backupStartPoint,0,sizeof(XLogRecPtr));
8164+
ControlFile->backupStartPoint=InvalidXLogRecPtr;
81658165
ControlFile->backupEndRequired= false;
81668166
UpdateControlFile();
81678167

‎src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ InitWalSenderSlot(void)
11151115
* Found a free slot. Reserve it for us.
11161116
*/
11171117
walsnd->pid=MyProcPid;
1118-
MemSet(&walsnd->sentPtr,0,sizeof(XLogRecPtr));
1118+
walsnd->sentPtr=InvalidXLogRecPtr;
11191119
walsnd->state=WALSNDSTATE_STARTUP;
11201120
SpinLockRelease(&walsnd->mutex);
11211121
/* don't need the lock anymore */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp