For the complete documentation index, see llms.txt. This page is also available as Markdown.

PostgreSQL

Connect PostgreSQL to the Pagerly SRE Agent to check active queries, locks, and replication lag.

What the Agent Can Do

  • Show active queries β€” find long-running queries, blocked sessions, idle-in-transaction

  • Show lock contention β€” which queries are blocking others

  • Show replication status β€” lag, state, sync status for each replica

  • Show table statistics β€” dead tuples (needs VACUUM), seq scans, table sizes

Setup Instructions

  1. Create a read-only PostgreSQL user with monitoring permissions:

CREATE USER pagerly WITH PASSWORD 'your-password';
GRANT pg_monitor TO pagerly;
  1. Ensure the database is accessible from the internet (or via SSH tunnel)

  2. Enter the connection details in the Pagerly dashboard

Required Credentials

Field
Description
Example

Connection String

host:port/database

your-db-host.com:5432/dbname

Username

PostgreSQL username with pg_monitor role

pagerly

Password

PostgreSQL password

your-password

We add the jdbc:postgresql:// prefix automatically. Just enter host:port/dbname.

Context Prompt Tips

"Main database is api_production. Tables in public schema. Long-running queries usually involve the orders table."

Docs

Last updated