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

Commiteb97aa7

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 parente84d243 commiteb97aa7

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
@@ -559,6 +559,9 @@ CheckPointReplicationOrigin(void)
559559
if (curstate->roident==InvalidRepOriginId)
560560
continue;
561561

562+
/* zero, to avoid uninitialized padding bytes */
563+
memset(&disk_state,0,sizeof(disk_state));
564+
562565
LWLockAcquire(&curstate->lock,LW_SHARED);
563566

564567
disk_state.roident=curstate->roident;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp