aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/transam/xlog.c6
-rw-r--r--src/backend/bootstrap/bootstrap.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 5452ae139a2..959f4231873 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -60,7 +60,7 @@
#include "utils/timestamp.h"
#include "pg_trace.h"
-extern bool bootstrap_data_checksums;
+extern uint32 bootstrap_data_checksum_version;
/* File path names (all relative to $PGDATA) */
#define RECOVERY_COMMAND_FILE "recovery.conf"
@@ -3797,7 +3797,7 @@ bool
DataChecksumsEnabled(void)
{
Assert(ControlFile != NULL);
- return ControlFile->data_checksums;
+ return (ControlFile->data_checksum_version > 0);
}
/*
@@ -4126,7 +4126,7 @@ BootStrapXLOG(void)
ControlFile->max_prepared_xacts = max_prepared_xacts;
ControlFile->max_locks_per_xact = max_locks_per_xact;
ControlFile->wal_level = wal_level;
- ControlFile->data_checksums = bootstrap_data_checksums;
+ ControlFile->data_checksum_version = bootstrap_data_checksum_version;
/* some additional ControlFile fields are set in WriteControlFile() */
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 287f19b6ece..9e401ef7a30 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -34,6 +34,7 @@
#include "postmaster/walwriter.h"
#include "replication/walreceiver.h"
#include "storage/bufmgr.h"
+#include "storage/bufpage.h"
#include "storage/ipc.h"
#include "storage/proc.h"
#include "tcop/tcopprot.h"
@@ -48,7 +49,7 @@
extern int optind;
extern char *optarg;
-bool bootstrap_data_checksums = false;
+uint32 bootstrap_data_checksum_version = 0; /* No checksum */
#define ALLOC(t, c) ((t *) calloc((unsigned)(c), sizeof(t)))
@@ -262,7 +263,7 @@ AuxiliaryProcessMain(int argc, char *argv[])
SetConfigOption("fsync", "false", PGC_POSTMASTER, PGC_S_ARGV);
break;
case 'k':
- bootstrap_data_checksums = true;
+ bootstrap_data_checksum_version = PG_DATA_CHECKSUM_VERSION;
break;
case 'r':
strlcpy(OutputFileName, optarg, MAXPGPATH);