run_vacuum
Reclaim table storage and refresh planner statistics with VACUUM, FULL, or ANALYZE; preview changes via dry_run and record prior stats for audit.
Instructions
[WRITE][risk=medium] VACUUM a table (optionally FULL/ANALYZE). Records prior stats.
No undo (a vacuum has no inverse); the prior dead-tuple/last-vacuum stats are
captured for the audit trail. VACUUM FULL takes an exclusive lock. Pass
dry_run=True to preview.
Args:
table: Table name (optionally schema-qualified, e.g. public.orders).
full: Run VACUUM FULL (rewrites the table, exclusive lock).
analyze: Also refresh planner statistics (VACUUM ANALYZE).
dry_run: If True, preview without running.
target: Target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | ||
| table | Yes | ||
| target | No | ||
| analyze | No | ||
| dry_run | No |