projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb03010
)
Fix page-level checksum calculation in checksum_impl.h
author
Michael Paquier
Thu, 5 Mar 2020 23:15:29 +0000
(08:15 +0900)
committer
Michael Paquier
Thu, 5 Mar 2020 23:15:29 +0000
(08:15 +0900)
Issue introduced by me, as of
0065174
.
Reported-by: David Steele
Discussion: https://postgr.es/m/
1cf30561
-7dad-dc6e-9fc3-
5c456948cfeb
@pgmasters.net
src/include/storage/checksum_impl.h
patch
|
blob
|
blame
|
history
diff --git
a/src/include/storage/checksum_impl.h
b/src/include/storage/checksum_impl.h
index 2f81cdf5b50d561b23037960145670494646389c..364acfafd21cc8f3d68389d77027998f24e4100e 100644
(file)
--- a/
src/include/storage/checksum_impl.h
+++ b/
src/include/storage/checksum_impl.h
@@
-211,5
+211,5
@@
pg_checksum_page(char *page, BlockNumber blkno)
* Reduce to a uint16 (to fit in the pd_checksum field) with an offset of
* one. That avoids checksums of zero, which seems like a good idea.
*/
- return (uint16) ((checksum % 6553
6
) + 1);
+ return (uint16) ((checksum % 6553
5
) + 1);
}