Commit addd034a authored by Michael Paquier's avatar Michael Paquier

Fix page-level checksum calculation in checksum_impl.h

Issue introduced by me, as of 00651743.

Reported-by: David Steele
Discussion: https://postgr.es/m/1cf30561-7dad-dc6e-9fc3-5c456948cfeb@pgmasters.net
parent bb03010b
......@@ -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 % 65536) + 1);
return (uint16) ((checksum % 65535) + 1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment