Skip to main content
Connect PostgreSQL to bring query performance, lock activity, and table data into NOFire’s system context. Before a deploy, that context shows what the change touches. When something breaks, the same signals are the evidence NOFire reasons over. You authenticate with a read-only PostgreSQL role.

Prerequisites

  • A PostgreSQL database that NOFire AI can reach.
  • A read-only role, created in Step 1.
  • The connection string, or the host, database, user, and password.

Step 1: Create a read-only role in PostgreSQL

Create a Read-Only Role

Connect to your database. Change the database and schema names to match your setup. Then create a role for NOFire:
Use a read-only role. NOFire runs every transaction with default_transaction_read_only=on, and a dedicated role makes that guarantee explicit for auditors.

Step 2: Add PostgreSQL connection to NOFire AI

  1. Open Connections and click Connect on PostgreSQL.
  2. Enter a Name for the connection (for example, production-app-db).
  3. Below Name, use the DSN / Host / Database buttons to switch modes. The form opens in DSN mode.

DSN

  • Connection String: masked (for example, postgresql://reader:[email protected]:5432/app?sslmode=require)
  • Host: for example, db.example.com
  • Port: defaults to 5432
  • Database: for example, app
  • User: for example, readonly_user
  • Password: masked
  • SSL Mode: defaults to require. Options: disable (no TLS, local dev only), allow, prefer, require (encrypted, no cert check), verify-ca, verify-full (recommended for prod)
Provide either a Connection String, or all of Host, Database, User, and Password. Statement Timeout (ms) sits below the credentials in both modes. It defaults to 5000.
Use verify-full for production connections. require is the default in the form, but it does not check the server certificate.
Click Connect. NOFire checks the credentials and creates the connection.

Test the connection

  1. Open Connections and make sure that the PostgreSQL connection shows Connected. A connection that shows Failing did not authenticate.
  2. Ask NOFire a question that needs database context, for example “which tables have the most sequential scans?”. An answer that names your tables confirms the connection works end to end.

Troubleshooting

The SSL mode on the connection is stricter than the server supports. verify-full needs a certificate the server can present and a matching host name.
The role cannot read the pg_stat_* views. Grant it pg_monitor.