Skip to content

feature: query performance health checks#26

Open
randoneering wants to merge 5 commits intomainfrom
feature/query_checks
Open

feature: query performance health checks#26
randoneering wants to merge 5 commits intomainfrom
feature/query_checks

Conversation

@randoneering
Copy link
Owner

@randoneering randoneering commented Feb 26, 2026

Pull Request Summary

This PR expands query-health coverage in pgFirstAid with high-impact, actionable checks and adds pgTAP validation for each new check across both pg_firstAid() and v_pgfirstaid.

  • Added a large set of query-health checks, including active runtime/lock/idle-in-transaction checks plus pg_stat_statements-based workload checks.
  • Added pg_stat_statements Extension Missing check with setup guidance for self-hosted PostgreSQL, AWS RDS, GCP Cloud SQL, and Azure PostgreSQL.
  • Added pgfirstaid_pg_stat_statements_checks() and wired it into pg_firstAid() + v_pgfirstaid so extension-dependent checks run only when available.
  • Updated high pgTAP coverage for all new checks (including conditional assertions); testing/pgTAP/03_high_tests.sql now runs 1..42.
  • Updated workflow trigger behavior so integration tests run when a PR is opened.

Type of Change

  • New health check
  • Bug fix
  • Performance improvement
  • Documentation update
  • Refactoring/code cleanup
  • Breaking change

Related Issues

  • Fixes #
  • Related to #
  • Closes #

Testing

  • Recompiled:
    • pgFirstAid.sql
    • view_pgFirstAid.sql
    • view_pgFirstAid_managed.sql
  • Updated testing/pgTAP/03_high_tests.sql plan to 1..42
  • Added pgTAP assertions for:
    • the new pg_stat_statements Extension Missing check
    • all conditional pg_stat_statements checks (only required when extension is present)
  • Ran:
    • testing/pgTAP/00_setup.sql
    • testing/pgTAP/03_high_tests.sql
    • testing/pgTAP/99_teardown.sql
  • Result: all 42 high-level checks passed

PostgreSQL Version Compatibility

Has this code been tested against the following PostgreSQL versions?

  • PostgreSQL 15
  • PostgreSQL 16
  • PostgreSQL 17
  • PostgreSQL 18

Testing notes:

Managed Database Platforms

Has this code been deployed and tested on the following platforms?

  • Amazon RDS for PostgreSQL
  • Google Cloud SQL for PostgreSQL
  • Azure Database for PostgreSQL
  • Self-managed PostgreSQL

Platform-specific notes:

  • Added provider-specific setup guidance and docs for enabling pg_stat_statements on:
    • self-hosted
    • AWS RDS
    • GCP Cloud SQL
    • Azure PostgreSQL
  • If pg_stat_statements is missing, pgFirstAid still runs and reports a clear action item.

Additional Notes


@randoneering
Copy link
Owner Author

Still need to test against AWS, GCP, and Azure. Neon tests passed. Still building out OSUOSL vms for additional self-hosted testing. Thanks OSUOSL!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant