You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-12-01 22:30:09 +02:00
This option allows pgBackRest to validate page checksums in data files when checksums are enabled on PostgreSQL >= 9.3. Note that this functionality requires a C library which may not initially be available in OS packages. The option will automatically be enabled when the library is present and checksums are enabled on the cluster.
38 lines
1.7 KiB
C
38 lines
1.7 KiB
C
#include "EXTERN.h"
|
|
#include "perl.h"
|
|
|
|
/***********************************************************************************************************************************
|
|
Older compilers do not define true/false
|
|
***********************************************************************************************************************************/
|
|
#ifndef false
|
|
#define false 0
|
|
#endif
|
|
|
|
#ifndef true
|
|
#define true 1
|
|
#endif
|
|
|
|
/***********************************************************************************************************************************
|
|
Define integer types based on Perl portability
|
|
***********************************************************************************************************************************/
|
|
typedef U8 uint8; /* == 8 bits */
|
|
typedef U16 uint16; /* == 16 bits */
|
|
typedef U32 uint32; /* == 32 bits */
|
|
typedef UV uint64; /* == 64 bits */
|
|
|
|
typedef I8 int8; /* == 8 bits */
|
|
typedef I16 int16; /* == 16 bits */
|
|
typedef I32 int32; /* == 32 bits */
|
|
typedef IV int64; /* == 64 bits */
|
|
|
|
/***********************************************************************************************************************************
|
|
Checksum functions
|
|
***********************************************************************************************************************************/
|
|
uint16 pageChecksum(const char *szPage, uint32 uiBlockNo, uint32 uiPageSize);
|
|
bool pageChecksumTest(const char *szPage, uint32 uiBlockNo, uint32 uiPageSize);
|
|
bool pageChecksumBuffer(const char *szPageBuffer, uint32 uiBufferSize, uint32 uiBlockNoStart, uint32 uiPageSize);
|
|
|
|
// !!! TEST STUFF
|
|
#define DUDEMAN 69
|
|
#define DUDESTRING "It's a String"
|