decisionshared last reviewed 2026-05-20

Use PostgreSQL by default for all new projects

Context

Multiple Aspire projects need persistent storage. Without a standing default, each project re-debates the database choice (MySQL, SQLite, MongoDB, etc.) and we end up with a heterogeneous stack that costs more to operate, backup, and integrate.

Detail

Options considered

OptionProsConsCost
A โ€” PostgreSQLACID, mature, pgvector extension, JSON support, self-hostable on Coolify, every Aspire engineer knows itSlightly more setup than SQLite for tiny apps$0 (self-hosted)
B โ€” MySQL/MariaDBFamiliar from WordPress sideNo native JSONB, weaker constraint enforcement, less pgvector-equivalent$0
C โ€” Heterogeneous (per-project choice)Maximum flexibilityCognitive load, backup tooling fragmentation, hiring complexityHigh operational

Decision

We chose: PostgreSQL (option A).

Rationale

Constraints we accepted

Revisit trigger

Volume on any single table exceeds 100M rows AND read latency degrades, OR a vendor SDK we adopt mandates a different DB.

Actions

Related

๐Ÿ”— Relationships

graph LR use_postgresql_by_default["use-postgresql-by-default"]:::self use_postgresql_by_default --> knowledge_os_stage_1["knowledge-os-stage-1"] use_postgresql_by_default --> aspire_llm_gateway_only_egress["aspire-llm-gateway-only-egress"] classDef self fill:#715EE3,color:#fff,stroke:#291F50;