Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Aug 20, 2023
1 parent 3b4f0d8 commit a5b825d
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 @@ -278,11 +278,13 @@ func (db *Postgres) Upgrade() error {

// pg_upgrade \
// --old-datadir /data/postgres \
// --new-datadir /data/postgres \
// --new-datadir /data/postgres-new \
// --old-bindir /usr/local/bin/pg-old \
// --new-bindir /usr/local/bin \
// --link
cmd = exec.Command(postgresUpgradeCmd, "--old-datadir", db.datadir, "--new-datadir", newDataDirTemp, "--old-bindir", oldPostgresBinDir, "--new-bindir", "/usr/local/bin", "--link") //nolint:gosec
pgUpgradeArgs := []string{"--old-datadir", db.datadir, "--new-datadir", newDataDirTemp, "--old-bindir", oldPostgresBinDir, "--new-bindir", "/usr/local/bin", "--link"}
db.log.Infow("running pg_upgrade with", "args", pgUpgradeArgs)
cmd = exec.Command(postgresUpgradeCmd, pgUpgradeArgs...) //nolint:gosec
out, err = cmd.CombinedOutput()
if err != nil {
db.log.Infow("unable to run pg_upgrade on new new datadir, abort upgrade", "output", out, "error", err)
Expand Down

0 comments on commit a5b825d

Please sign in to comment.