2017-09-30 10:44:03 -04:00
|
|
|
/***********************************************************************************************************************************
|
|
|
|
Checksum Implementation for Data Pages
|
|
|
|
***********************************************************************************************************************************/
|
2018-04-03 13:35:56 -04:00
|
|
|
#ifndef POSTGRES_PAGECHECKSUM_H
|
|
|
|
#define POSTGRES_PAGECHECKSUM_H
|
2017-08-25 16:47:47 -04:00
|
|
|
|
|
|
|
#include "common/type.h"
|
|
|
|
|
|
|
|
/***********************************************************************************************************************************
|
|
|
|
Functions
|
|
|
|
***********************************************************************************************************************************/
|
2018-03-02 12:07:12 -05:00
|
|
|
uint16 pageChecksum(const unsigned char *page, unsigned int blockNo, unsigned int pageSize);
|
|
|
|
bool pageChecksumTest(
|
|
|
|
const unsigned char *page, unsigned int blockNo, unsigned int pageSize, uint32 ignoreWalId, uint32 ignoreWalOffset);
|
2017-08-25 16:47:47 -04:00
|
|
|
bool pageChecksumBufferTest(
|
2018-03-02 12:07:12 -05:00
|
|
|
const unsigned char *pageBuffer, unsigned int pageBufferSize, unsigned int blockNoBegin, unsigned int pageSize,
|
|
|
|
uint32 ignoreWalId, uint32 ignoreWalOffset);
|
2017-08-25 16:47:47 -04:00
|
|
|
|
|
|
|
#endif
|