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 66c221e commit e987c66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/internal/database/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ func (db *Postgres) Upgrade() error {

// mkdir /data/postgres-new
newDataDirTemp := path.Join("/data", "postgres-new")
err = os.RemoveAll(newDataDirTemp)
if err != nil {
db.log.Infow("unable to remove new datadir, skipping upgrade", "error", err)
return nil
}
err = os.MkdirAll(newDataDirTemp, 0700)
if err != nil {
db.log.Infow("unable to create new datadir, skipping upgrade", "error", err)
Expand Down

0 comments on commit e987c66

Please sign in to comment.