1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-19 11:30:07 +02:00

remove is_checksum_enabled variable

This commit is contained in:
Grigory Smolkin 2019-04-13 22:50:39 +03:00
parent 2e639a81fe
commit c290624765
3 changed files with 6 additions and 7 deletions

View File

@ -73,7 +73,6 @@ static StreamThreadArg stream_thread_arg = {"", NULL, 1};
static int is_ptrack_enable = false;
bool is_ptrack_support = false;
bool is_checksum_enabled = false;
bool exclusive_backup = false;
bool heapallindexed_is_supported = false;
@ -1201,9 +1200,10 @@ pgdata_basic_setup(void)
/* Confirm that this server version is supported */
check_server_version();
current.checksum_version = get_data_checksum_version(true);
is_checksum_enabled = pg_checksum_enable();
if (pg_checksum_enable())
current.checksum_version = 1;
else
current.checksum_version = 0;
/*
@ -1216,7 +1216,7 @@ pgdata_basic_setup(void)
if (!is_remote_backup)
check_system_identifiers();
if (is_checksum_enabled)
if (current.checksum_version)
elog(LOG, "This PostgreSQL instance was initialized with data block checksums. "
"Data block corruption will be detected");
else

View File

@ -419,7 +419,7 @@ prepare_page(backup_files_arg *arguments,
*/
memcpy(page, ptrack_page, BLCKSZ);
free(ptrack_page);
if (is_checksum_enabled)
if (current.checksum_version)
((PageHeader) page)->pd_checksum = pg_checksum_page(page, absolute_blknum);
}
/* get lsn from page, provided by pg_ptrack_get_block() */

View File

@ -385,7 +385,6 @@ extern bool smooth_checkpoint;
extern bool is_remote_backup;
extern bool is_ptrack_support;
extern bool is_checksum_enabled;
extern bool exclusive_backup;
/* restore options */