run_vacuum
Run VACUUM on a PostgreSQL table to reclaim dead tuples and refresh statistics. Supports FULL and ANALYZE options, with dry-run and audit trail.
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 |