# pawurb/rails-pg-extras

Rails PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more.

Repository: https://github.com/pawurb/rails-pg-extras
Canonical: https://ross.abutalabs.com/products/rails-pg-extras
Language: Ruby
License: MIT
License Family: permissive
Topics: rails, postgresql, activerecord
Last push: 2026-06-16T22:29:27+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 87, release rhythm 35, longevity 100
- inputs: {"age_days": 2443, "days_push": 78, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1247, forks 39 (observed 2026-08-28T04:04:07.586451+00:00)

## What it is
A Ruby gem providing PostgreSQL performance diagnostics for Rails applications, ported from Heroku PG Extras. It exposes rake tasks, a Ruby API, and an optional web UI for queries about locks, index usage, buffer cache hit ratios, vacuum stats, and slow queries.

## Use cases
- diagnose slow postgres queries in a rails app
- check index usage and missing indexes in postgresql
- inspect database locks and blocking queries
- monitor buffer cache hit ratio and vacuum stats
- find most expensive sql queries with pg_stat_statements
- integrate postgres health checks into monitoring tasks

## When to choose
- you run a Ruby on Rails app on PostgreSQL and need performance insights without Heroku's plugin
- you want a scriptable Ruby API plus optional web UI for database diagnostics
- you need quick rake-task-based access to pg_stat_statements, locks, and cache stats

## When to avoid
- your app is not on Rails or Ruby (use ruby-pg-extras or the Node/Rust/Elixir/Python ports instead)
- you need full continuous database observability rather than on-demand diagnostics
- you use a database other than PostgreSQL

## Facets
- artifact type: library
- maturity: active
- function: database, monitoring, developer-tools
- domain: databases, developer-tools, performance, web-development
- platform: ruby
- tags: postgresql, rails, activerecord, database-performance, diagnostics, rake-tasks

## Member repositories
- pawurb/rails-pg-extras (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:07.586451+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:07:58.552731+00:00, confidence not recorded.
  - readme: https://github.com/pawurb/rails-pg-extras (fetched 2026-08-28T04:04:07.586451+00:00, sha 3ae6f3b7d06b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
