Home / Features / Apps / Per-app Postgres
Per-app Postgres database on osFoundry
Every Room App on osFoundry gets its own Postgres database with pgvector and TimescaleDB pre-installed. Connection string is injected as a secret at runtime; schema is yours; migrations are runtime-driven through the app SDK. Backed up nightly, point-in-time restore, signed-URL backup downloads.
Quick answer
- Per-app Postgres with pgvector + TimescaleDB.
- Connection string injected as a runtime secret.
- Nightly backups with PITR and signed-URL downloads.
- Browser-based DB browser + SQL runner.
Key capabilities
- Per-app isolated Postgres 16 instance.
- pgvector pre-installed — store embeddings alongside relational data.
- TimescaleDB pre-installed — time-series and hypertables.
- Nightly backups + point-in-time restore.
- Browser DB browser with SQL runner, schema viewer, row editor.
- CDC subscription endpoint per table (wal2json).
How to do it in osFoundry
- Provision — Click "Add Postgres" on your app. Instance is ready in ~30 seconds with a connection string in your secrets vault as DATABASE_URL.
- Connect from app code — Read process.env.DATABASE_URL with any Postgres client (pg, postgres.js, Prisma, Drizzle…).
- Migrate the schema — Run migrations from app code on boot, or use the SQL runner in the DB browser interactively.
- Back up + restore — Nightly backups are automatic. Trigger on-demand snapshots, download via signed URL, restore to any point in the retention window.
Use cases
- Internal-tool dev: Build a tickets app — Postgres for tickets, pgvector for semantic search across descriptions, TimescaleDB for SLA reporting.
- AI app builder: Embedding-heavy app stores 1M vectors in pgvector alongside relational metadata — no separate vector DB.
Frequently asked questions
Can apps share a Postgres database?
Each app has its own. Cross-app data sharing is via cross-app data grants (typed, audited).
Can I run my own SQL in the database?
Yes — the per-instance DB browser includes a SQL runner.
What Postgres version?
Postgres 16 with pgvector and TimescaleDB. Updates are managed by the platform.
Can I bring an existing schema?
Yes — restore from a backup or run your migrations on first boot.
How is the database backed up?
Nightly snapshot retained for the workspace’s configured PITR window (default 7 days; longer on enterprise plans).
Pricing
Per-GB-day storage + per-second of database compute. Idle databases cost only storage.
Related features