mirror of https://github.com/status-im/go-waku.git
chore: vacuum DB after deleting records
This commit is contained in:
parent
19f13b80fa
commit
30527b9a80
|
@ -127,6 +127,12 @@ func (d *DBStore) cleanOlderRecords() error {
|
|||
}
|
||||
}
|
||||
|
||||
// reduce the size of the DB file after the delete operation. See: https://www.sqlite.org/lang_vacuum.html
|
||||
_, err := d.db.Exec("VACUUM")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue