Skip to content

Commit

Permalink
cmd/mi: don't vaccum
Browse files Browse the repository at this point in the history
Signed-off-by: Xe Iaso <[email protected]>
  • Loading branch information
Xe committed Sep 7, 2024
1 parent 6bc0473 commit 43e9437
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cmd/mi/models/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,6 @@ func (d *DAO) backup(ctx context.Context, to string) error {
return fmt.Errorf("failed to get database connection: %w", err)
}

if _, err := db.Exec("VACCUM"); err != nil {
return fmt.Errorf("failed to vacuum source database: %w", err)
}

defer conn.Close()

if err := conn.Raw(func(dca any) error {
Expand All @@ -210,10 +206,6 @@ func (d *DAO) backup(ctx context.Context, to string) error {
return fmt.Errorf("failed to close backup: %w", err)
}

if err := conn.Raw().Exec("VACUUM"); err != nil {
return fmt.Errorf("failed to vacuum database: %w", err)
}

return nil
}); err != nil {
return fmt.Errorf("failed to backup database: %w", err)
Expand Down

0 comments on commit 43e9437

Please sign in to comment.