|
105 | 105 | #include "utils/timestamp.h"
|
106 | 106 | #include "utils/varlena.h"
|
107 | 107 |
|
108 |
| -extern uint32 bootstrap_data_checksum_version; |
109 |
| - |
110 | 108 | /* timeline ID to be used when bootstrapping */
|
111 | 109 | #define BootstrapTimeLineID 1
|
112 | 110 |
|
@@ -683,7 +681,7 @@ static void ValidateXLOGDirectoryStructure(void);
|
683 | 681 | static void CleanupBackupHistory(void);
|
684 | 682 | static void UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force);
|
685 | 683 | static bool PerformRecoveryXLogAction(void);
|
686 |
| -static void InitControlFile(uint64 sysidentifier); |
| 684 | +static void InitControlFile(uint64 sysidentifier, uint32 data_checksum_version); |
687 | 685 | static void WriteControlFile(void);
|
688 | 686 | static void ReadControlFile(void);
|
689 | 687 | static void UpdateControlFile(void);
|
@@ -4190,7 +4188,7 @@ CleanupBackupHistory(void)
|
4190 | 4188 | */
|
4191 | 4189 |
|
4192 | 4190 | static void
|
4193 |
| -InitControlFile(uint64 sysidentifier) |
| 4191 | +InitControlFile(uint64 sysidentifier, uint32 data_checksum_version) |
4194 | 4192 | {
|
4195 | 4193 | char mock_auth_nonce[MOCK_AUTH_NONCE_LEN];
|
4196 | 4194 |
|
@@ -4221,7 +4219,7 @@ InitControlFile(uint64 sysidentifier)
|
4221 | 4219 | ControlFile->wal_level = wal_level;
|
4222 | 4220 | ControlFile->wal_log_hints = wal_log_hints;
|
4223 | 4221 | ControlFile->track_commit_timestamp = track_commit_timestamp;
|
4224 |
| - ControlFile->data_checksum_version = bootstrap_data_checksum_version; |
| 4222 | + ControlFile->data_checksum_version = data_checksum_version; |
4225 | 4223 | }
|
4226 | 4224 |
|
4227 | 4225 | static void
|
@@ -4997,7 +4995,7 @@ XLOGShmemInit(void)
|
4997 | 4995 | * and the initial XLOG segment.
|
4998 | 4996 | */
|
4999 | 4997 | void
|
5000 |
| -BootStrapXLOG(void) |
| 4998 | +BootStrapXLOG(uint32 data_checksum_version) |
5001 | 4999 | {
|
5002 | 5000 | CheckPoint checkPoint;
|
5003 | 5001 | char *buffer;
|
@@ -5139,7 +5137,7 @@ BootStrapXLOG(void)
|
5139 | 5137 | openLogFile = -1;
|
5140 | 5138 |
|
5141 | 5139 | /* Now create pg_control */
|
5142 |
| - InitControlFile(sysidentifier); |
| 5140 | + InitControlFile(sysidentifier, data_checksum_version); |
5143 | 5141 | ControlFile->time = checkPoint.time;
|
5144 | 5142 | ControlFile->checkPoint = checkPoint.redo;
|
5145 | 5143 | ControlFile->checkPointCopy = checkPoint;
|
|
0 commit comments