Files
k8scd/tools/dqlite-vacuum/go.mod
T
Ruben Hensen 175769d36c Add a tool to VACUUM the k8s-dqlite database
dqlite supports VACUUM from v1.18.2, which microk8s 1.34 ships, but the dqlite shell wraps every statement in a transaction and SQLite refuses to VACUUM inside one. dqlite-vacuum sends it through the go-dqlite driver instead and otherwise just prints page statistics. dqlite-vacuum.sh makes the backups first.

Rehearsed on opti1 on a throwaway node in /dev/shm: 657 MB to 41 MB in 0.6s, with concurrent writes unaffected and the data intact after restarts.
2026-10-23 22:03:30 +02:00

17 lines
345 B
AMPL

module dqlite-vacuum
go 1.27.3
require (
github.com/canonical/go-dqlite/v3 v3.0.1
gopkg.in/yaml.v2 v2.4.0
)
require (
github.com/Rican7/retry v0.3.1 // indirect
github.com/google/renameio v1.0.1 // indirect
github.com/mattn/go-sqlite3 v1.14.7 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/sync v0.8.0 // indirect
)