Content-Length: 259233 | pFad | http://github.com/postgrespro/postgres_cluster/commit/eb97aa7e65627c602f559207a5a104cacbdd585f

D1 Zero padding in replication origen's checkpointed on disk-state. · postgrespro/postgres_cluster@eb97aa7 · GitHub
Skip to content

Commit eb97aa7

Browse files
committed
Zero padding in replication origen's checkpointed on disk-state.
This seems to be largely cosmetic, avoiding valgrind bleats and the like. The uninitialized padding influences the CRC of the on-disk entry, but because it's also used when verifying the CRC, that doesn't cause spurious failures. Backpatch nonetheless. It's a bit unfortunate that contrib/test_decoding/sql/replorigen.sql doesn't exercise the checkpoint path, but checkpoints are fairly expensive on weaker machines, and we'd have to stop/start for that to be meaningful. Author: Andres Freund Discussion: https://postgr.es/m/20170422183123.w2jgiuxtts7qrqaq@alap3.anarazel.de Backpatch: 9.5, where replication origens were introduced
1 parent e84d243 commit eb97aa7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/replication/logical/origen.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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/eb97aa7e65627c602f559207a5a104cacbdd585f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy