You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Move logic from postgres/pageChecksum to command/backup/pageChecksum().
The postgres/pageChecksum module was designed as an interface to the C structs for the Perl code. The new C code can do this directly so no need for an interface. Move the remaining test for pgPageChecksum() into the postgres/interface test module.
This commit is contained in:
@ -20,6 +20,9 @@ which could have a large impact on dependencies. Hopefully that won't happen of
|
||||
Note when adding new types it is safer to add them to version.auto.c unless they are needed for code that must be compatible across
|
||||
all versions of PostgreSQL supported by pgBackRest.
|
||||
***********************************************************************************************************************************/
|
||||
#ifndef POSTGRES_INTERFACE_STATICAUTO_H
|
||||
#define POSTGRES_INTERFACE_STATICAUTO_H
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "postgres/interface.h"
|
||||
|
||||
@ -45,6 +48,10 @@ typedef uint16_t uint16;
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
typedef uint32_t uint32;
|
||||
|
||||
// uint64 type
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
typedef uint64_t uint64;
|
||||
|
||||
// TransactionId type
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
typedef uint32 TransactionId;
|
||||
@ -130,6 +137,11 @@ typedef struct
|
||||
uint32 xrecoff; /* low bits */
|
||||
} PageXLogRecPtr;
|
||||
|
||||
// PageXLogRecPtrGet macro
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
#define PageXLogRecPtrGet(val) \
|
||||
((uint64) (val).xlogid << 32 | (val).xrecoff)
|
||||
|
||||
// PageHeaderData type
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
/*
|
||||
@ -204,3 +216,5 @@ typedef PageHeaderData *PageHeader;
|
||||
* returns true if page has not been initialized (by PageInit)
|
||||
*/
|
||||
#define PageIsNew(page) (((PageHeader) (page))->pd_upper == 0)
|
||||
|
||||
#endif
|
||||
|
@ -40,16 +40,6 @@ typedef int64_t int64;
|
||||
|
||||
#endif
|
||||
|
||||
// uint64 type
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
#if PG_VERSION > PG_VERSION_MAX
|
||||
|
||||
#elif PG_VERSION >= PG_VERSION_83
|
||||
|
||||
typedef uint64_t uint64;
|
||||
|
||||
#endif
|
||||
|
||||
// MultiXactId type
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
#if PG_VERSION > PG_VERSION_MAX
|
||||
|
Reference in New Issue
Block a user