Documentation
Databases

Connect to PostgreSQL

Connection URLs, TLS, pooling, timeouts, and application-safe defaults.

8 minute read ยท Updated September 2026

Connection URL

Copy the URL from the Connect workflow. URL-encode special characters if you assemble a URL yourself. Prefer the generated value over manual transcription.

.env
DATABASE_URL="postgresql://USER:PASSWORD@db.renviq.com:5432/DATABASE?sslmode=verify-full"

Verify TLS

Production clients must encrypt traffic and verify the Renviq server identity. For libpq-compatible tools use sslmode=verify-full. Frameworks may expose the same setting as ssl, sslmode, or a driver-specific TLS option.

Never disable certificate checks casually

If a client rejects the certificate, fix its trust configuration. Do not permanently switch production traffic to plaintext or an insecure verification mode.

Connection pooling

  • Reuse connections; do not create a new connection per request.
  • Set the application pool below the database role limit.
  • Reserve connections for migrations and operations.
  • Use short connection timeouts and bounded exponential backoff.
  • Close idle development clients and background tools.

Test from your application host

A laptop test does not prove your production network path. Run the final connectivity check from the same environment where the application will execute.

Shell
psql "$DATABASE_URL" -c "select current_database(), current_user, version();"
Was this guide useful?

If anything is unclear or incorrect, tell the support team.

Get help