# pgfirstaid.com Name: pgFirstAid Description: Open-source PostgreSQL health-check SQL function and view. Inspired by FirstResponderKit for SQL Server. Single SQL file, zero dependencies, prioritized recommendations. URL: https://pgfirstaid.com Repository: https://github.com/randoneering/pgFirstAid License: MIT Maintainer: Randoneering, LLC ## Usage (SQL) ```sql -- Copy and paste the function or view definition into your PostgreSQL database -- Then run it: --- function SELECT * FROM pg_firstAid(); --- view SELECT * FROM v_pgfirstAid; Filter by Severity -- Show only critical issues SELECT * FROM pg_firstAid() WHERE severity = 'CRITICAL'; SELECT * FROM v_pgfirstAid WHERE severity = 'MEDIUM'; -- Show critical and high priority issues SELECT * FROM pg_firstAid() WHERE severity IN ('CRITICAL', 'HIGH'); SELECT * FROM v_pgfirstAid WHERE severity IN ('CRITICAL', 'HIGH'); Filter by Category -- Categories: Table Health, Query Health, Replication Health, System Health, Database Health -- Check table health SELECT * FROM v_pgfirstAid WHERE category = 'Table Health'; Count Issues by Severity SELECT severity, COUNT(*) as issue_count FROM pg_firstAid() GROUP BY severity ORDER BY MIN(CASE severity WHEN 'CRITICAL' THEN 1 WHEN 'HIGH' THEN 2 WHEN 'MEDIUM' THEN 3 WHEN 'LOW' THEN 4 ELSE 5 END); ``` ## Capabilities - Documentation: human-readable HTML - llms.txt: /llms.txt (curated links for LLMs) - llms-full.txt: /llms-full.txt (full site content as one markdown document) - Sitemap: /sitemap-index.xml - Source code: https://github.com/randoneering/pgFirstAid ## Protocols - https: standard (Cloudflare-proxied) ## Restrictions - No write endpoints - No authentication required - No rate limiting on public reads ## Last Updated 2026-07-25