Skip to content

Get started with VACUUM #407

@dnwiebe

Description

@dnwiebe

VACUUM is a SQLite-specific operation that squeezes deleted space out of database files. It's interesting for two reasons. First, it makes the files consume less disk space; second, it overwrites the deleted space so that it cannot be forensically analyzed by an attacker to recover some or all of the data that was deleted.

VACUUM is not an operation that should be performed whenever anything is deleted from the database: that would be too expensive. However, it should be performed on a reasonably frequent basis to protect the user's privacy and disk space.

Write some code to perform the VACUUM operation periodically, noting that it should not take place while the database is being used for anything else.

Suggestions: One good time to perform a VACUUM operation might be during a Graceful Shutdown (put card number in here). However, it will still be possible for the Node to crash unexpectedly, in which case the database file will be unVACUUMed. Therefore, it might be advisable to VACUUM during bootstrap as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🔖 Ready

    Status

    Ready for Development

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions