How do I connect a Postgres read replica to iDBQuery without exposing it publicly?

Point iDBQuery at a read-only replica reachable on your private network — deploy iDBQuery in the same VPC (or air-gapped) so it connects over private networking with a read-only user, never a public endpoint. iDBQuery queries in place and touches only the replica, leaving your primary untouched.

The safest pattern is to give iDBQuery a read replica rather than your primary, and to keep the connection entirely private.

  • Use a read replica and a read-only role. iDBQuery only ever reads, so a replica with a least-privilege, read-only user means analytics load never hits your primary and no writes are possible.
  • Keep it off the public internet. Deploy iDBQuery inside the same VPC/private network as the replica (or fully air-gapped) so it reaches the database over private networking — you don't open a public port, whitelist iDBQuery's IPs, or expose the replica.
  • Connect and introspect. iDBQuery reads the schema, applies its semantic layer, and adds the replica to your one live queryable model.

From there, teams ask in plain language — *"Show signups by plan this week"* — and iDBQuery writes the SQL, runs it against the replica, and returns a cited answer traceable to source rows. Because iDBQuery queries in place and doesn't copy your data into a separate system, the replica stays the single source of truth. Encryption in transit and at rest, RBAC, and audit-friendly citations round out the posture. You can also blend the replica with a warehouse or spreadsheet in one question — one model, no pipeline — while everything stays inside your network boundary.

Updated 2026-06-22