The Daily Commit · Section Edition Front Page PHP AI Dev EN DE FR ES

The Php Times

Reads — Ecosystem

New Vacuum Package Turns Postgres Stats Into Laravel Health Checks


Developer Rati Rukhadze released Vacuum, a Laravel package that reads PostgreSQL's own statistics views to flag bloat, dead tuples, unused indexes and slow queries, then scores database health out of 100.

LARAVEL NEWS, September 14, 2026 curated by Sönke

It ships CLI commands for CI pipelines and a Blade or Filament dashboard, requiring PostgreSQL 14 and Laravel 11 or newer.

Rati Rukhadze has published Vacuum, a PostgreSQL monitoring and schema-linting package for Laravel. Instead of adding new instrumentation, it queries statistics PostgreSQL already collects internally, through views such as pg_stat_user_tables, pg_stat_activity and pg_stat_statements, and turns the results into a list of problems with the SQL needed to fix each one.

terminal
php artisan vacuum:check
php artisan vacuum:check --fail-on=warning # critical, warning, info, or never
php artisan vacuum:check --format=json # score, grade, deductions, findings

The package applies 13 advisor rules covering issues like transaction ID wraparound risk, table bloat, dead tuples, unused indexes and slow statements. Findings feed into an overall health score out of 100. Results appear either in a Blade dashboard at the /vacuum route or through a dedicated plugin for Filament 4 and 5.

Two Artisan commands bring the checks into automation: vacuum:check can fail a build when it hits critical findings, and vacuum:lint flags schema problems such as unindexed foreign keys during CI runs. Thresholds are configurable in config/vacuum.php, for example dead_tuple_ratio defaults to 0.20 and slow_query_milliseconds defaults to 500. A history feature stores scheduled snapshots to track trends and forecast future issues, and a companion set of 13 lessons explains common PostgreSQL problems using the developer's own database tables as examples, including N+1 query patterns.

Vacuum 1.2.0 requires PostgreSQL 14 and Laravel 11 or newer. The pg_stat_statements extension is optional; without it, the dashboard simply notes that it is missing. Installation runs through Composer followed by an install command. The dashboard is open by default only in the local environment; access elsewhere requires a custom callback registered via the Vacuum::auth() method, for example restricting the page to authenticated admin users.

Read the original source ↗

Rate this article: 0

Readers’ Forum

No contributions yet — open the debate.

← Ecosystem — Page B1

"All the Code That's Fit to Ship" · The Daily Commit · Screen edition · Imprint · Privacy Policy