From a5b825de22f34623ac12a2a15eb567cc63e39c90 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Sun, 20 Aug 2023 15:31:22 +0200 Subject: [PATCH] fix --- cmd/internal/database/postgres/postgres.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/internal/database/postgres/postgres.go b/cmd/internal/database/postgres/postgres.go index b3446f0..4d8ddc5 100644 --- a/cmd/internal/database/postgres/postgres.go +++ b/cmd/internal/database/postgres/postgres.go @@ -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)