Skip to content

Commit

Permalink
Do not check system identifier for PG 9.4 Fix #459
Browse files Browse the repository at this point in the history
  • Loading branch information
x4m authored and reshke committed Dec 4, 2019
1 parent d41440c commit d372cbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/backup_push_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func HandleBackupPush(uploader *Uploader, archiveDirectory string, isPermanent b
if *previousBackupSentinelDto.BackupFinishLSN > backupStartLSN {
tracelog.ErrorLogger.FatalOnError(NewBackupFromFuture(previousBackupName))
}
if previousBackupSentinelDto.SystemIdentifier != nil && *systemIdentifier != *previousBackupSentinelDto.SystemIdentifier {
if previousBackupSentinelDto.SystemIdentifier != nil && systemIdentifier != nil && *systemIdentifier != *previousBackupSentinelDto.SystemIdentifier {

tracelog.ErrorLogger.FatalOnError(NewBackupFromOtherBD())
}
Expand Down Expand Up @@ -273,4 +273,4 @@ func CheckPgVersionAndPgControl(archiveDirectory string) {
tracelog.ErrorLogger.FatalfOnError("It looks like you are trying to backup not pg_data. PgControl file not found: %v\n", err)
_, err = ioutil.ReadFile(filepath.Join(archiveDirectory, "PG_VERSION"))
tracelog.ErrorLogger.FatalfOnError("It looks like you are trying to backup not pg_data. PG_VERSION file not found: %v\n", err)
}
}
2 changes: 1 addition & 1 deletion internal/queryRunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func NewPgQueryRunner(conn *pgx.Conn) (*PgQueryRunner, error) {
}
err = r.getSystemIdentifier()
if err != nil {
return nil, err
tracelog.WarningLogger.Printf("Couldn't get system identifier because of error: '%v'\n", err)
}

return r, nil
Expand Down

0 comments on commit d372cbd

Please sign in to comment.