Skip to content

Any Postgres

What the engine needs from a database, what it installs in it, and how to install it by hand when your database is locked down.

Applies to EngineCloud
View as Markdown
On this page
  1. What it installs
  2. What it needs
  3. Locked-down databases
  4. Connections

The engine works with any PostgreSQL 14 or later it can reach with a connection string: Amazon RDS and Aurora, Google Cloud SQL, Azure Database for PostgreSQL, Neon, Supabase, Crunchy Bridge, or your own server.

What it installs

ThingWhat for
Schema sypnia_authusers, identities, sessions, refresh tokens, one-time tokens, OAuth clients, PATs, API keys, rate limits, audit
Schema sypnia_datamigrations, SQL audit, settings, signing keys (encrypted)
Schemas auth and sypniaonly the helper functions your policies call
Roles anon, authenticated, service_rolethe roles requests run as (no login)
Role sypnia_authenticatorthe engine’s login for the Data API: no rights of its own, member of the three roles above
Role sypnia_adminowner of your schemas; the SQL endpoint and migrations run as it

No extension is required. If pg_trgm or citext are present, user search uses them.

What it needs

For the automatic install, a user that can create roles (CREATEROLE) and create schemas in the database. On Amazon RDS the master user is enough. The engine never needs a superuser.

Terminal
DATABASE_URL="postgres://admin:…@db.example.com:5432/app?sslmode=verify-full" sypnia-data install

Locked-down databases

If no user can create roles, print the SQL and give it to whoever administers the database:

Terminal
sypnia-data install --print-sql > sypnia-install.sql

Then start the engine with two connection strings: one as sypnia_authenticator (requests) and one as sypnia_admin (SQL and migrations).

Connections

Use TLS (sslmode=require, better verify-full). The engine keeps a small pool per project: how small, and how to put a pooler in front, is in Scaling and connection pooling.

  1. What it installs
  2. What it needs
  3. Locked-down databases
  4. Connections

    Search pages, sections and terms