|
|
|
|
@ -105,8 +105,6 @@ |
|
|
|
|
#include "utils/timestamp.h" |
|
|
|
|
#include "utils/varlena.h" |
|
|
|
|
|
|
|
|
|
extern uint32 bootstrap_data_checksum_version; |
|
|
|
|
|
|
|
|
|
/* timeline ID to be used when bootstrapping */ |
|
|
|
|
#define BootstrapTimeLineID 1 |
|
|
|
|
|
|
|
|
|
@ -683,7 +681,7 @@ static void ValidateXLOGDirectoryStructure(void); |
|
|
|
|
static void CleanupBackupHistory(void); |
|
|
|
|
static void UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force); |
|
|
|
|
static bool PerformRecoveryXLogAction(void); |
|
|
|
|
static void InitControlFile(uint64 sysidentifier); |
|
|
|
|
static void InitControlFile(uint64 sysidentifier, uint32 data_checksum_version); |
|
|
|
|
static void WriteControlFile(void); |
|
|
|
|
static void ReadControlFile(void); |
|
|
|
|
static void UpdateControlFile(void); |
|
|
|
|
@ -4190,7 +4188,7 @@ CleanupBackupHistory(void) |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
InitControlFile(uint64 sysidentifier) |
|
|
|
|
InitControlFile(uint64 sysidentifier, uint32 data_checksum_version) |
|
|
|
|
{ |
|
|
|
|
char mock_auth_nonce[MOCK_AUTH_NONCE_LEN]; |
|
|
|
|
|
|
|
|
|
@ -4221,7 +4219,7 @@ InitControlFile(uint64 sysidentifier) |
|
|
|
|
ControlFile->wal_level = wal_level; |
|
|
|
|
ControlFile->wal_log_hints = wal_log_hints; |
|
|
|
|
ControlFile->track_commit_timestamp = track_commit_timestamp; |
|
|
|
|
ControlFile->data_checksum_version = bootstrap_data_checksum_version; |
|
|
|
|
ControlFile->data_checksum_version = data_checksum_version; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
@ -4997,7 +4995,7 @@ XLOGShmemInit(void) |
|
|
|
|
* and the initial XLOG segment. |
|
|
|
|
*/ |
|
|
|
|
void |
|
|
|
|
BootStrapXLOG(void) |
|
|
|
|
BootStrapXLOG(uint32 data_checksum_version) |
|
|
|
|
{ |
|
|
|
|
CheckPoint checkPoint; |
|
|
|
|
char *buffer; |
|
|
|
|
@ -5139,7 +5137,7 @@ BootStrapXLOG(void) |
|
|
|
|
openLogFile = -1; |
|
|
|
|
|
|
|
|
|
/* Now create pg_control */ |
|
|
|
|
InitControlFile(sysidentifier); |
|
|
|
|
InitControlFile(sysidentifier, data_checksum_version); |
|
|
|
|
ControlFile->time = checkPoint.time; |
|
|
|
|
ControlFile->checkPoint = checkPoint.redo; |
|
|
|
|
ControlFile->checkPointCopy = checkPoint; |
|
|
|
|
|