engine = "hybrid" on a Postgres block:
floo.app.toml
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:
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: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.
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.-
Declare a second Postgres service with
engine = "hybrid". If a service listsmanagedunder[services.<name>.env], addpostgres:hybridthere.floo.app.toml -
Deploy. The new database’s URL is
DATABASE_URL_HYBRID. -
Stop writes to the old database, then copy each environment.
floo db dumpruns your localpg_dump, which must be PostgreSQL 17 or newer:Repeat with--env dev. Export the database lists dump errors and options. -
Point the app at
DATABASE_URL_HYBRIDand deploy. -
Once the app runs on the new database, remove the old block and delete it
with
floo services remove.