Manager: perform a database vacuum after migrations
Just to make sure the DB is properly cleaned up after a big migration happened.
This commit is contained in:
parent
7277286391
commit
358efe7ae0
@ -75,6 +75,10 @@ func OpenDB(ctx context.Context, dsn string) (*DB, error) {
|
|||||||
return nil, ErrIntegrity
|
return nil, ErrIntegrity
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Perform another vacuum after database migration, as that may have copied a
|
||||||
|
// lot of data and then dropped another lot of data.
|
||||||
|
db.vacuum()
|
||||||
|
|
||||||
closeConnOnReturn = false
|
closeConnOnReturn = false
|
||||||
return db, nil
|
return db, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user