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

Commit39369b4

Browse files
committed
Zero padding in replication origin's checkpointed on disk-state.
This seems to be largely cosmetic, avoiding valgrind bleats and thelike. The uninitialized padding influences the CRC of the on-diskentry, but because it's also used when verifying the CRC, that doesn'tcause spurious failures. Backpatch nonetheless.It's a bit unfortunate that contrib/test_decoding/sql/replorigin.sqldoesn't exercise the checkpoint path, but checkpoints are fairlyexpensive on weaker machines, and we'd have to stop/start for that tobe meaningful.Author: Andres FreundDiscussion:https://postgr.es/m/20170422183123.w2jgiuxtts7qrqaq@alap3.anarazel.deBackpatch: 9.5, where replication origins were introduced
1 parentf588548 commit39369b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/replication/logical/origin.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,9 @@ CheckPointReplicationOrigin(void)
566566
if (curstate->roident==InvalidRepOriginId)
567567
continue;
568568

569+
/* zero, to avoid uninitialized padding bytes */
570+
memset(&disk_state,0,sizeof(disk_state));
571+
569572
LWLockAcquire(&curstate->lock,LW_SHARED);
570573

571574
disk_state.roident=curstate->roident;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp