Postgres
Rocketgraph watches any Postgres database from its own statistics: tables, row counts, slow queries and what is running now.
Works with any Postgres Rocketgraph can reach: Supabase, Neon, RDS, Cloud SQL or self-hosted. It reads statistics only, never your rows. What it finds shows on the Postgres page.
For a private RDS or Aurora database, connect AWS CloudWatch instead. It reads RDS through AWS without connecting to the database.
Connect
- Open Connect and click Postgres under Databases.
- Make a monitoring login: run this in your database as an admin. In Supabase or Neon, use the SQL Editor.
```sql -- Run once as an admin (Supabase or Neon: SQL Editor). -- A login that can read statistics and nothing else. It can't read your rows. CREATE ROLE rocketgraph_monitor WITH LOGIN PASSWORD 'choose-a-long-password'; GRANT pg_monitor TO rocketgraph_monitor;
-- For the Queries tab. Already on in Supabase and Neon. On RDS, add -- pg_stat_statements to shared_preload_libraries first. CREATE EXTENSION IF NOT EXISTS pg_stat_statements; ```
- Connection string: use the login you just made, like
postgresql://rocketgraph_monitor:…@host:5432/postgres. In Supabase: Connect → Session pooler. In Neon: Connect → connection string. - Click Connect Postgres. Rocketgraph connects, reads the database name, version, size and table count, and tells you if
pg_stat_statementsis off.
What Rocketgraph reads
Every session is read-only, with an 8 second statement timeout. It reads only Postgres's statistics views:
pg_stat_user_tablesandpg_class: row estimates, dead rows, size, inserts, updates, deletes, sequential and index scans, last vacuum and analyze.pg_stat_statements: query text (first 1,000 characters), calls, total and mean time, rows. Its own monitoring queries are left out.pg_stat_activity: sessions running now, what they wait on, and their query text (first 1,000 characters).pg_stat_databaseand size functions: database size, connections, cache hit rate.
The Postgres page has four tabs: Tables, Queries, History and Running now. For History, Rocketgraph records the change in each table and query about every five minutes.
pg_monitor can't read your tables. But query text in pg_stat_activity can include values your app wrote into its SQL.
Known limits
- One database: the one named in the connection string.
- Up to 500 tables (largest first) and 200 queries (most total time first).
- History is kept for 7 days.
- The Queries tab needs
pg_stat_statements. - The database must be reachable from Rocketgraph over the internet.
Disconnect
Open Postgres on the Connect page and click Disconnect Postgres. Then drop the login:
DROP ROLE rocketgraph_monitor;