diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/transam/xlogreader.c | 16 | ||||
-rw-r--r-- | src/backend/replication/basebackup.c | 11 |
2 files changed, 6 insertions, 21 deletions
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index 88be7fe0223..41dae916b46 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -783,20 +783,10 @@ XLogReaderValidatePageHeader(XLogReaderState *state, XLogRecPtr recptr, if (state->system_identifier && longhdr->xlp_sysid != state->system_identifier) { - char fhdrident_str[32]; - char sysident_str[32]; - - /* - * Format sysids separately to keep platform-dependent format code - * out of the translatable message string. - */ - snprintf(fhdrident_str, sizeof(fhdrident_str), UINT64_FORMAT, - longhdr->xlp_sysid); - snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT, - state->system_identifier); report_invalid_record(state, - "WAL file is from different database system: WAL file database system identifier is %s, pg_control database system identifier is %s", - fhdrident_str, sysident_str); + "WAL file is from different database system: WAL file database system identifier is %llu, pg_control database system identifier is %llu", + (unsigned long long) longhdr->xlp_sysid, + (unsigned long long) state->system_identifier); return false; } else if (longhdr->xlp_seg_size != state->wal_segment_size) diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index c2978a949ad..7a1b38466b8 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -106,7 +106,7 @@ static TimestampTz throttled_last; static XLogRecPtr startptr; /* Total number of checksum failures during base backup. */ -static int64 total_checksum_failures; +static long long int total_checksum_failures; /* Do not verify checksums. */ static bool noverify_checksums = false; @@ -607,14 +607,9 @@ perform_base_backup(basebackup_options *opt) if (total_checksum_failures) { if (total_checksum_failures > 1) - { - char buf[64]; - - snprintf(buf, sizeof(buf), INT64_FORMAT, total_checksum_failures); - ereport(WARNING, - (errmsg("%s total checksum verification failures", buf))); - } + (errmsg("%lld total checksum verification failures", total_checksum_failures))); + ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), errmsg("checksum verification failure during base backup"))); |