<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/postgresql-monitoring-and-schema-linting-for-laravel-with-vacuum-auo6fncya" -->

---
title: PostgreSQL Monitoring and Schema Linting for Laravel...
description: Vacuum is a PostgreSQL monitoring package for Laravel that reads PostgreSQL's built-in statistics views (pg_stat_user_tables, pg_stat_activity,...
canonical: https://daily.dev/posts/postgresql-monitoring-and-schema-linting-for-laravel-with-vacuum-auo6fncya
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: PostgreSQL Monitoring and Schema Linting for Laravel with Vacuum | daily.dev
og:description: Vacuum is a PostgreSQL monitoring package for Laravel that reads PostgreSQL's built-in statistics views (pg_stat_user_tables, pg_stat_activity,...
og:url: https://daily.dev/posts/postgresql-monitoring-and-schema-linting-for-laravel-with-vacuum-auo6fncya
og:image: https://api.daily.dev/og/posts/aUo6fNcYA.png
og:image:alt: PostgreSQL Monitoring and Schema Linting for Laravel with Vacuum
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL Monitoring and Schema Linting for Laravel with Vacuum

**[Laravel News](https://daily.dev/sources/ln)** · 2 min read · 5 upvotes · 0 comments

## Summary

Vacuum is a PostgreSQL monitoring package for Laravel that reads PostgreSQL's built-in statistics views (pg_stat_user_tables, pg_stat_activity, pg_stat_statements) to surface issues like bloat, transaction ID wraparound, dead tuples, unused indexes, and slow queries. It computes a health score out of 100, offers a Blade dashboard or Filament 4/5 plugin, a vacuum:check command that can fail CI builds on critical findings, a vacuum:lint command for schema issues like unindexed foreign keys, historical trend tracking, and built-in explainers using the app's own tables. Version 1.2.0 requires PostgreSQL 14 and Laravel 11+, with pg_stat_statements as an optional extension.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laravel-news.com/vacuum-laravel-postgresql-monitoring>

## Questions this post answers

### What does the Vacuum package for Laravel actually check in a PostgreSQL database?

Vacuum reads PostgreSQL's built-in statistics views such as pg_stat_user_tables, pg_stat_activity, and pg_stat_statements to run 13 advisor rules covering transaction ID wraparound, table bloat, dead tuples, unused indexes, and slow statements. It produces a health score out of 100 and can flag unindexed foreign keys in migrations through a separate vacuum:lint command, useful in CI pipelines.

_Developers evaluating database health tooling can find package deep-dives like this one on daily.dev._

### What versions of Laravel and PostgreSQL does the Vacuum monitoring package require?

Vacuum 1.2.0 requires PostgreSQL 14 or newer and Laravel 11 or newer. The pg_stat_statements extension is optional; without it the dashboard simply reports that the extension is missing rather than failing outright.

_Laravel developers checking package compatibility before adopting new tools can track releases like this on daily.dev._

### How can I fail a CI build when a Laravel app's PostgreSQL database has critical health issues?

Run the vacuum:check artisan command with the --fail-on flag set to critical, warning, or info to fail a build when findings exceed that severity, or use --format=json to get a machine-readable score, grade, and list of deductions. Rule thresholds, like a dead_tuple_ratio of 0.20 or slow_query_milliseconds of 500, are configurable in config/vacuum.php.

_Teams wiring database health checks into CI can follow practical setups like this via daily.dev._

## Similar posts on daily.dev

- [Pavel Stehule's blog: Integration Lua to psql III](https://daily.dev/posts/pavel-stehule-s-blog-integration-lua-to-psql-iii-rohomopop) · Planet PostgreSQL · 0 upvotes · 0 comments
- [Monitor Laravel Queues, Commands, and Schedulers on Any Driver with Vigilance](https://daily.dev/posts/monitor-laravel-queues-commands-and-schedulers-on-any-driver-with-vigilance-tadagv3uw) · Laravel News · 42 upvotes · 2 comments
- [My queries to monitor autovacuum](https://daily.dev/posts/my-queries-to-monitor-autovacuum-vscqbjwpm) · CYBERTEC PostgreSQL · 0 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#php](https://daily.dev/tags/php), [#postgresql](https://daily.dev/tags/postgresql), [#laravel](https://daily.dev/tags/laravel)

[View this post on daily.dev](https://daily.dev/posts/postgresql-monitoring-and-schema-linting-for-laravel-with-vacuum-auo6fncya)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"PostgreSQL Monitoring and Schema Linting for Laravel with Vacuum","url":"https://daily.dev/posts/postgresql-monitoring-and-schema-linting-for-laravel-with-vacuum-auo6fncya","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/postgresql-monitoring-and-schema-linting-for-laravel-with-vacuum-auo6fncya"},"datePublished":"2026-09-14T14:03:06.963Z","dateModified":"2026-09-14T14:03:29.703Z","description":"Vacuum is a PostgreSQL monitoring package for Laravel that reads PostgreSQL's built-in statistics views (pg_stat_user_tables, pg_stat_activity,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dac3aff86f6b13674a8e49d23073797e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dac3aff86f6b13674a8e49d23073797e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Laravel News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Laravel News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ln","url":"https://daily.dev/sources/ln"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/postgresql-monitoring-and-schema-linting-for-laravel-with-vacuum-auo6fncya","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,php,postgresql,laravel","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Laravel News","item":"https://daily.dev/sources/ln"},{"@type":"ListItem","position":3,"name":"PostgreSQL Monitoring and Schema Linting for Laravel with Vacuum"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/postgresql-monitoring-and-schema-linting-for-laravel-with-vacuum-auo6fncya#faq","mainEntity":[{"@type":"Question","name":"What does the Vacuum package for Laravel actually check in a PostgreSQL database?","acceptedAnswer":{"@type":"Answer","text":"Vacuum reads PostgreSQL's built-in statistics views such as pg_stat_user_tables, pg_stat_activity, and pg_stat_statements to run 13 advisor rules covering transaction ID wraparound, table bloat, dead tuples, unused indexes, and slow statements. It produces a health score out of 100 and can flag unindexed foreign keys in migrations through a separate vacuum:lint command, useful in CI pipelines. Developers evaluating database health tooling can find package deep-dives like this one on daily.dev."}},{"@type":"Question","name":"What versions of Laravel and PostgreSQL does the Vacuum monitoring package require?","acceptedAnswer":{"@type":"Answer","text":"Vacuum 1.2.0 requires PostgreSQL 14 or newer and Laravel 11 or newer. The pg_stat_statements extension is optional; without it the dashboard simply reports that the extension is missing rather than failing outright. Laravel developers checking package compatibility before adopting new tools can track releases like this on daily.dev."}},{"@type":"Question","name":"How can I fail a CI build when a Laravel app's PostgreSQL database has critical health issues?","acceptedAnswer":{"@type":"Answer","text":"Run the vacuum:check artisan command with the --fail-on flag set to critical, warning, or info to fail a build when findings exceed that severity, or use --format=json to get a machine-readable score, grade, and list of deductions. Rule thresholds, like a dead_tuple_ratio of 0.20 or slow_query_milliseconds of 500, are configurable in config/vacuum.php. Teams wiring database health checks into CI can follow practical setups like this via daily.dev."}}]}
```

