# YSD-0129 — Persistence and projection technology selection

- **Status:** approved (2026-07-18)
- **Priority:** P0 EXT — blocking (production rollout gated via YSD-0139)
- **Decision owner:** @GreyChimp
- **Drafted:** 2026-07-18 by Claude Code (claude-fable-5)
- **Approval:** approved as recommended by @GreyChimp on 2026-07-18; outcome
  recorded in decision-log.json; review by 2027-07-18

## Question

Which authoritative stores and rebuildable projections does the workspace use?

## Recommendation

PostgreSQL 16 (existing yemaya + nisaba databases, pgvector enabled) as the sole
authoritative store; MinIO/S3 rights-aware object storage; BullMQ/Redis jobs;
projections start with Postgres FTS + pgvector and adopt
Elasticsearch/Qdrant/Neo4j only on measured capacity/latency need (they are
already available behind dev profiles). Backed by the YSD-0105 infrastructure
inventory: every candidate is provisioned, and nothing currently measured forces
polyglot storage.

## Options considered

- Speculative polyglot (ES+Qdrant+Neo4j from day one) — rejected by §26.9:
  choose from measured scale.
- New database provisioning — unnecessary: yemaya and nisaba databases already
  exist in POSTGRES_MULTIPLE_DATABASES.

## Consequences

- Section 3 schemas land in Postgres with migrations; YSD-3044 keeps projections
  rebuildable so later store swaps are non-breaking.
- Data-residency/backup/deletion requirements from YSD-0129 text are carried
  into Section 3.4.

## Machine-enforced outcome (once approved)

Local-dev composition (YSD-1011) and service config schemas (YSD-1012) encode
exactly the approved stores.
