Skip to content

Commit

Permalink
Keep both.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Aug 23, 2023
1 parent 42ef13d commit 3915e83
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/internal/database/postgres/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ func (db *Postgres) Upgrade() error {
return nil
}

// If this is a database directory, save actual postgres binaries for a later major upgrade
err := db.copyPostgresBinaries()
if err != nil {
return err
}

// Check if required commands are present
for _, command := range requiredCommands {
if ok := db.isCommandPresent(command); !ok {
Expand Down Expand Up @@ -78,7 +84,7 @@ func (db *Postgres) Upgrade() error {
// Check if old pg_config are present and match pgVersion
oldPostgresConfigCmd := path.Join(oldPostgresBinDir, postgresConfigCmd)
if ok := db.isCommandPresent(oldPostgresConfigCmd); !ok {
db.log.Infof("%q is not present, please make sure that at least one backup was taken with the old postgres version before running an upgrade, skipping upgrade", oldPostgresConfigCmd)
db.log.Infof("%q is not present, please make sure that at least one backup was taken with the old postgres version or restart the backup-restore-sidecar container with the old postgres version before running an upgrade, skipping upgrade", oldPostgresConfigCmd)
return nil
}

Expand Down

0 comments on commit 3915e83

Please sign in to comment.