pgFirstAid Easy-to-deploy, open source PostgreSQL function that provides a prioritized list of actions to improve database stability and performance. Inspired by Brent Ozar's FirstResponderKit for SQL Server, pgFirstAid is designed for everyone to use—not just DBAs! Get actionable health insights from your PostgreSQL database in seconds. Features Zero Dependencies - Single SQL function, no external tools required - Single SQL function, no external tools required Comprehensive Checks - 12 (and growing!) built-in health checks covering critical performance and stability issues - 12 (and growing!) built-in health checks covering critical performance and stability issues Prioritized Results - Issues ranked by severity (CRITICAL → HIGH → MEDIUM → LOW → INFO) - Issues ranked by severity (CRITICAL → HIGH → MEDIUM → LOW → INFO) Actionable Recommendations - Each issue includes specific remediation steps - Each issue includes specific remediation steps Documentation Links - Direct links to official PostgreSQL documentation for deeper learning Quick Start Installation -- Copy and paste the function definition into your PostgreSQL database -- Then run it: SELECT * FROM pg_firstAid(); That's it! No configuration needed. Deploy as a user with the highest possible priviledges (in your environment) to avoid issues. Example Output severity category check_name object_name issue_description current_value recommended_action documentation_link CRITICAL Table Structure Missing Primary Key public.users Table missing a primary key... No primary key defined Add a primary key or unique constraint... https://www.postgresql.org/... HIGH Statistics Missing Statistics public.orders Table has never been analyzed... Last analyze: Never Run ANALYZE on this table... https://www.postgresql.org/... What Does It Check? CRITICAL Issues Missing Primary Keys - Tables without primary keys that can cause replication issues and poor performance Unused Large Indexes - Indexes consuming significant disk space ...
First seen: 2025-11-16 15:58
Last seen: 2025-11-16 20:58