You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Use PG_PAGE_SIZE_DEFAULT constant instead of pageSize variable.
Page size is passed around a lot but in fact it can only have one value, PG_PAGE_SIZE_DEFAULT, which is checked when pg_control is loaded. There may be an argument for supporting multiple page sizes in the future but for now just use the constant to simplify the code. There is also a significant performance benefit. Because pageSize was being used in pageChecksumBlock() the main loop was neither unrolled nor vectorized (-funroll-loops -ftree-vectorize) as it is now with a constant loop boundary.
This commit is contained in:
@ -9,7 +9,7 @@ Checksum Implementation for Data Pages
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
uint16_t pgPageChecksum(const unsigned char *page, unsigned int blockNo, unsigned int pageSize);
|
||||
uint16_t pgPageChecksum(const unsigned char *page, unsigned int blockNo);
|
||||
uint64_t pgPageLsn(const unsigned char *page);
|
||||
bool pgPageChecksumTest(
|
||||
const unsigned char *page, unsigned int blockNo, unsigned int pageSize, uint32_t ignoreWalId, uint32_t ignoreWalOffset);
|
||||
|
Reference in New Issue
Block a user