Skip to content

Vacuum old history

A table’s transaction log grows with what you write. vacuum_table deletes the history older than retain_from_version, by default every version but the latest, so time travel and restores reach back only that far. The rows stay as they are. It isn’t journaled and can’t be undone, so its dry_run is on by default: it lists the log files that would go.

vacuum_table deletes log history older than a version. You can no longer time travel to an earlier version, and the rows stay untouched. It’s a dry run unless you pass dry_run: false, and an agent runs it only when you ask.

vacuum_table

{ "table": "film" }

Answer:

{
"table": "main.public.film",
"retained_from": 8,
"deleted": [
"store:transaction_log/main.public.film/00000000000000000000.json",
"store:transaction_log/main.public.film/00000000000000000001.json",
"store:transaction_log/main.public.film/00000000000000000002.json",
"store:transaction_log/main.public.film/00000000000000000003.json",
"store:transaction_log/main.public.film/00000000000000000004.json",
"store:transaction_log/main.public.film/00000000000000000005.json",
"store:transaction_log/main.public.film/00000000000000000006.json",
"store:transaction_log/main.public.film/00000000000000000007.json"
],
"dry_run": true
}