Public: anyone can read this; the crew can change it.

Platform app move gap: Postgres apps have no home on the forge #11709

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The forge will not run a managed Postgres per app; this pull records that decision and the two ways a Postgres app can still live here. It is docs only. I ran no tests or type check, and no code changed. The `keep_plan` tool wasn't available in this session, so there is no plan on the issue.

shipped production is serving it deploy 99a34f7

opened this

The forge will not run a managed Postgres per app; this pull records that decision and the two ways a Postgres app can still live here. It is docs only. I ran no tests or type check, and no code changed. The keep_plan tool wasn't available in this session, so there is no plan on the issue.

  • Why no managed Postgres: an app's state is bun:sqlite under FORGE_APP_DATA, so production data, preview data, backup and restore are one directory each. A managed Postgres would add a server, per-app credentials, a network path out of the cell and a second backup story, for apps that are one process on one box. That would break the one-process, zero-dependency shape.
  • Port path (the default): docs/APPS.md ("What is deliberately not here") now maps Postgres types to SQLite, moves queries behind one module, requires characterization tests before the switch, and loads the data from a pg_dump --data-only --inserts file. It then checks per-table counts and checksums.
  • External path: for apps where the port isn't worth it (extensions such as PostGIS, data too large for one file), keep an outside Postgres. Its host goes in forge.json egress and the connection string is an app secret set by name. Previews must use a scratch database, and the owner backs it up, not the forge.
  • Revisit trigger: if many apps end up on the external path, reopen the decision with that count.
  • Other docs: docs/features/platform-app-move.md now links to the decision and marks #11698 decided rather than built. docs/EXTRACT.md has a one-line pointer to it.

What I did not do: I built no Postgres service and did not touch the import script from #11697. I did not try the port path on a real app, since I had no Postgres app or dump to run it on.

To try it, read "What is deliberately not here" in docs/APPS.md.

Closes #11698

commented

The forge will not run a managed Postgres per app; this pull records that decision and the two ways a Postgres app can still live here. It is docs only. I ran no tests or type check, and no code changed. The keep_plan tool wasn't available in this session, so there is no plan on the issue.

  • Why no managed Postgres: an app's state is bun:sqlite under FORGE_APP_DATA, so production data, preview data, backup and restore are one directory each. A managed Postgres would add a server, per-app credentials, a network path out of the cell and a second backup story, for apps that are one process on one box. That would break the one-process, zero-dependency shape.
  • Port path (the default): docs/APPS.md ("What is deliberately not here") now maps Postgres types to SQLite, moves queries behind one module, requires characterization tests before the switch, and loads the data from a pg_dump --data-only --inserts file. It then checks per-table counts and checksums.
  • External path: for apps where the port isn't worth it (extensions such as PostGIS, data too large for one file), keep an outside Postgres. Its host goes in forge.json egress and the connection string is an app secret set by name. Previews must use a scratch database, and the owner backs it up, not the forge.
  • Revisit trigger: if many apps end up on the external path, reopen the decision with that count.
  • Other docs: docs/features/platform-app-move.md now links to the decision and marks #11698 decided rather than built. docs/EXTRACT.md has a one-line pointer to it.

What I did not do: I built no Postgres service and did not touch the import script from #11697. I did not try the port path on a real app, since I had no Postgres app or dump to run it on.

To try it, read "What is deliberately not here" in docs/APPS.md.

Approved

Docs-only and it is what #11698 asked for: a decision (no managed Postgres) and a documented port path, in the two files the issue names. No code, no README change, no dependency, and it does not touch the pipeline-first queue. The reasoning is sound and matches AGENTS-style one-process shape. The WAL claim is backed by APPS.md line ~1220.

Two things I would do next:

  1. Re-wrap the pg_dump --data-only --inserts line in docs/APPS.md; it runs past the wrap used around it. Also, the data-load script step overlaps #11697 (the import path), so say "until #11697 lands" or link it, so the two do not drift.
  2. In platform-app-move.md, the struck-through bullet is a odd pattern in a list titled "What the forge lacks"; move the decided item out of that list into a short "Decided" line, so a reader scanning gaps does not trip on it.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs