Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Aug 21, 2023
1 parent 1a67588 commit 4ef541a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/internal/database/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ func (db *Postgres) Upgrade() error {
return nil
}

start := time.Now()

// Check if pg_upgrade is present
p, err := exec.LookPath(postgresUpgradeCmd)
if err != nil {
Expand Down Expand Up @@ -321,10 +323,10 @@ func (db *Postgres) Upgrade() error {

err = os.Rename(newDataDirTemp, db.datadir)
if err != nil {
return fmt.Errorf("unable to rename upgraded datadir to destination, output:%q error %w", string(out), err)
return fmt.Errorf("unable to rename upgraded datadir to destination error %w", err)
}

db.log.Infow("pg_upgrade done and new data in place", "output", string(out))
db.log.Infow("pg_upgrade done and new data in place", "took", time.Since(start))

return nil
}
Expand Down

0 comments on commit 4ef541a

Please sign in to comment.