# Design

> The decisions that define pgetcd, condensed from its design records.

---

LLMS index: [llms.txt](/llms.txt)

---

pgetcd's companion repository accumulated 357 dated design and implementation records during development. This section condenses the architectural decisions that govern the current codebase and separates the active MVP scope from post-MVP roadmap and frozen research work.

## Current goal and review {#mvp-goal}

- **[Status review, 2026-11-08](/docs/etcd/design/review-2026-11-08/)** — Where the project stood before the MVP decision: code almost untracked, P3 drifted into kernel accounting, and why the work did not converge; with the outcome up to `v0.1.0-rc2`.
- **[MVP goal (v0.1.0)](/docs/etcd/design/mvp-goal/)** — Approved on 2026-11-08: the `v0.1.0-rcN` release candidate is the only completion condition, with the single-primary scope, the lean release checklist and the rule that verification stays proportionate to an MVP. The current candidate is `v0.1.0-rc2` (commit `81691bc`).
{.cards}

## Core architecture decisions {#core}

- **[PostgreSQL as the authority](/docs/etcd/design/postgresql-authority/)** — Why revisions, transactions, Leases, and event history live in logged PostgreSQL tables under a single meta-row lock rather than sequences or gateway caches (Design 0005).
- **[Certified publication](/docs/etcd/design/certified-publication/)** — Why read requests write a WAL barrier, why responses wait for synchronous `COMMIT`, and why unknown commits are never replayed (Design 0006).
- **[Lease, Watch and history](/docs/etcd/design/lease-watch-history/)** — Why Lease deadlines rebuild with a full TTL on restart, why `NOTIFY` is only a wake hint, and how anchor generations support atomic compaction (Design 0007).
- **[Runtime boundary](/docs/etcd/design/runtime-boundary/)** — Why `pgetcd`, `pgsilo`, and `pgredis` keep separate gateway processes and extensions until shared runtime integration is built (Design 0004).
{.cards}

## Post-MVP roadmap and research {#roadmap}

- **[High availability roadmap](/docs/etcd/design/ha-roadmap/)** — Target 3-node synchronous replication topology, primary fencing requirements, and single-container fault-injection findings (Design 0028, Design 0119).
- **[Recovery design](/docs/etcd/design/recovery/)** — Point-in-time recovery protocol rebasing (`pgetcd-restore`) and per-gateway publication revision journals (Design 0029, Design 0030).
- **[The frozen native line](/docs/etcd/design/native-line/)** — Summary of the 340+ records exploring custom wire stacks, Go runtime accounting, and the Linux shared-kernel accounting boundary (Design 0119, Design 0320, Design 0357).
{.cards}

---

Section pages:

- [PostgreSQL as the authority](/docs/etcd/design/postgresql-authority/): One Go gateway and one extension; a meta-row lock and a fresh snapshot per request; no sequences.
- [Certified publication](/docs/etcd/design/certified-publication/): Why reads write a barrier, why responses wait for synchronous commit, and why unknown commits are not replayed.
- [Lease, Watch and history](/docs/etcd/design/lease-watch-history/): Full-TTL rebuild after restart, NOTIFY as a hint, and anchor generations for compaction.
- [Runtime boundary](/docs/etcd/design/runtime-boundary/): Why etcd, S3 and Redis keep separate gateways instead of one shared runtime.
- [High availability roadmap](/docs/etcd/design/ha-roadmap/): The post-MVP design for production HA, and the fault tests that informed it.
- [Recovery design](/docs/etcd/design/recovery/): Point-in-time recovery and revision journals. Designed, not in the release.
- [The frozen native line](/docs/etcd/design/native-line/): The native PostgreSQL wire and runtime accounting work, and why it was frozen.
- [Status review, 2026-11-08](/docs/etcd/design/review-2026-11-08/): Where pgetcd stood before the MVP decision, why the work did not converge, and what changed.
- [MVP goal (v0.1.0)](/docs/etcd/design/mvp-goal/): The approved MVP scope, the lean release checklist and the verification rule for pgetcd v0.1.0.
