Fix page-level checksum calculation in checksum_impl.h

Issue introduced by me, as of 0065174.

Reported-by: David Steele
Discussion: https://postgr.es/m/1cf30561-7dad-dc6e-9fc3-5c456948cfeb@pgmasters.net
This commit is contained in:
Michael Paquier 2020-03-06 08:15:29 +09:00
parent bb03010b9f
commit addd034ae1
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}