ADR-0007: Use Postgres for the decision store
Status
Accepted — 2026-04-12
Context
We need a primary store for decision documents (brief and adr artifacts) and the append-only audit trail. Reads are heavy; writes are append-mostly. The team's existing operational expertise is in Postgres; nobody on the on-call rotation has run Mongo or DynamoDB at scale.
A second-tier requirement: we want to ship analytics on decision velocity (median days-from-proposed-to-accepted) without standing up a separate warehouse for the first 12 months.
Decision
We will use a single Postgres 16 instance, hosted on Neon, as the primary datastore for decision documents and the audit log. JSONB columns will hold the document body and the metadata bag; structured columns hold status, deciders, and timestamps for query.
Consequences
Easier
- One query language for application code and analytics. No ETL job for the
first 12 months.
- JSONB gives us schemaless flexibility for the metadata bag without giving
up joins on status and decider_id.
- Backups, point-in-time restore, and read replicas are checkbox features on
Neon.
Harder
- We're locked into vertical scaling for the next ~18 months. If decision
volume grows 100×, we will need to revisit (and that revisit will itself be an ADR).
- Cross-region replication becomes a project, not a config change.
- We give up the option of fan-out writes to a search index without explicit
triggers — full-text search will be tsvector for now, which is fine until it isn't.