mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
36a5349b1c
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.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
#define PERL_NO_GET_CONTEXT
|
|
|
|
#include "LibC.h"
|
|
#include "XSUB.h"
|
|
#include "const-c.inc"
|
|
|
|
/*
|
|
* The following C types are mapped by the current typemap:
|
|
* 'AV *', 'Boolean', 'CV *', 'FILE *', 'FileHandle', 'HV *', 'I16', 'I32', 'I8', 'IV', 'InOutStream', 'InputStream', 'NV',
|
|
* 'OutputStream', 'PerlIO *', 'Result', 'STRLEN', 'SV *', 'SVREF', 'SysRet', 'SysRetLong', 'Time_t *', 'U16', 'U32', 'U8', 'UV',
|
|
* 'bool', 'bool_t', 'caddr_t', 'char', 'char *', 'char **', 'const char *', 'double', 'float', 'int', 'long', 'short', 'size_t',
|
|
* 'ssize_t', 'time_t', 'unsigned', 'unsigned char', 'unsigned char *', 'unsigned int', 'unsigned long', 'unsigned long *',
|
|
* 'unsigned short', 'void *', 'wchar_t', 'wchar_t *'
|
|
*/
|
|
|
|
MODULE = pgBackRest::LibC PACKAGE = pgBackRest::LibC
|
|
|
|
INCLUDE: const-xs.inc
|
|
|
|
U16
|
|
pageChecksum(page, blkno, pageSize)
|
|
const char * page
|
|
U32 blkno
|
|
U32 pageSize
|
|
|
|
bool
|
|
pageChecksumTest(page, blockNo, pageSize)
|
|
const char *page
|
|
U32 blockNo
|
|
U32 pageSize
|
|
|
|
bool
|
|
pageChecksumBuffer(pageBuffer, bufferSize, blockNoStart, pageSize)
|
|
const char *pageBuffer
|
|
U32 bufferSize
|
|
U32 blockNoStart
|
|
U32 pageSize
|