Skip to main content
Hybrid Postgres is Postgres 17 that floo runs on its own infrastructure: a lower-cost engine for low-traffic apps, internal tools, and scheduled jobs. It is in beta, on the Starter plan and up. See pricing. Set engine = "hybrid" on a Postgres block:
floo.app.toml
Leaving engine out, or setting engine = "neon", keeps the default engine described in Postgres. Declaring, attaching, and removing work as for any managed service.

What gets injected

The same variables as default Postgres: DATABASE_URL plus PGHOST, PGPORT, PGDATABASE, PGUSER, and PGPASSWORD for [managed.default], and DATABASE_URL_<NAME> for a named service. Dev and prod each get their own database and password:
The user name app.<id> is how floo finds your database, so pass it unchanged. The server presents a publicly trusted TLS certificate, so sslmode=verify-full works. With libpq 16 or newer, add sslrootcert=system to verify against the system’s trusted certificates.

Sleep and wake

The database sleeps when idle and wakes on the first query. That first query takes about a second longer. keep_warm is not available on this engine.

Connection pools

An idle connection can be closed when the database sleeps or when floo updates the machine it runs on. Validate a pooled connection before each use, and reconnect when one drops. SQLAlchemy:
psycopg_pool:
node-postgres: handle the pool’s error event, and retry a query that fails on a dropped connection. Retry only statements that are safe to run twice.

Durability and backups

  • Every commit is synced to disk before it returns.
  • The write-ahead log is archived off the machine continuously, at least once a minute while the database writes.
  • A full base backup is taken daily.
  • Backups are kept for 8 days.
If a database is lost, floo restores it from the latest base backup and the archived log. The app reaches the restored database after that environment’s next restart or deploy. There is no self-serve restore: floo db restore answers POSTGRES_NOT_RESTORABLE for a hybrid database.

Limits

Move an existing database

A database never changes engine, so moving means a new service and a copy of the data.
  1. Declare a second Postgres service with engine = "hybrid". If a service lists managed under [services.<name>.env], add postgres:hybrid there.
    floo.app.toml
  2. Deploy. The new database’s URL is DATABASE_URL_HYBRID.
  3. Stop writes to the old database, then copy each environment. floo db dump runs your local pg_dump, which must be PostgreSQL 17 or newer:
    Repeat with --env dev. Export the database lists dump errors and options.
  4. Point the app at DATABASE_URL_HYBRID and deploy.
  5. Once the app runs on the new database, remove the old block and delete it with floo services remove.