Skip to content

docs(experiment): oliphaunt/pglite-oxide as a lightweight dev-mode database (WIN-2130)#9967

Draft
rubenfiszel wants to merge 1 commit into
mainfrom
ruben/win-2130-experiment-oliphaunt-as-lightweight-dev-mode
Draft

docs(experiment): oliphaunt/pglite-oxide as a lightweight dev-mode database (WIN-2130)#9967
rubenfiszel wants to merge 1 commit into
mainfrom
ruben/win-2130-experiment-oliphaunt-as-lightweight-dev-mode

Conversation

@rubenfiszel

@rubenfiszel rubenfiszel commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The WIN-2130 experiment: can Windmill run against oliphaunt / pglite-oxide — embedded Postgres 17.5 (WASIX, no Docker, no install) — as a lightweight dev mode?

Yes. With the migration-bootstrap fix (merged separately in #9970, now on main), a full Windmill server+worker boots on the embedded single-connection database and runs scripts and flows:

SCRIPT: {"success":true,"completed":true,"result":"6x7=42"}
FLOW:   {"success":true,"completed":true,"result":"step-b-ok-flow-complete"}
PostgreSQL version: PostgreSQL 17.5 on wasm32-unknown-wasix … 32-bit

This PR is now just the experiment — the enabling code fix has landed on its own. It adds:

  • docs/experiments/oliphaunt-lightweight-dev-mode.md — the write-up: the single-connection ≡ max_connections=1 insight, why the runtime needs only one connection, the three migration-bootstrap sites that didn't, the fix (fix(migrations): run bootstrap housekeeping on the migrator's held connection #9970), caveats, and how to reproduce/isolate.
  • dev/embedded-db/ — standalone harness (deliberately not a backend-workspace member; it pulls the heavy wasmer/alpha-pinned tree that must not leak into the backend lockfile):
    • wm-embedded-db — boots embedded pglite, exports DATABASE_URL, execs a child (e.g. the windmill binary).
    • schema-compat — applies Windmill's full 1182-migration set on a single connection (~950 ms) to prove schema compatibility.
    • committed Cargo.lock with the required virtual-net = 0.702.0-alpha.3 pin (else wasmer-wasix won't compile).

It is an experiment / build-it-yourself dev tool, not a release artifact (publish = false): pglite-oxide 0.5.1 pins alpha wasmer crates and is 32-bit/single-connection, so it's not something to ship in a supported release yet.

Caveats

  • Single-connection = serialized: a single-developer dev convenience, not production/load.
  • 32-bit wasm backend (4 GiB ceiling). uuid-ossp is the only extension pglite lacks and Windmill doesn't need it (already stripped in OVERRIDDEN_MIGRATIONS; schema uses gen_random_uuid()).

Test plan

Fixes WIN-2130. Depends on #9970 (merged).

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8e7c1ce
Status: ✅  Deploy successful!
Preview URL: https://40b02100.windmill.pages.dev
Branch Preview URL: https://ruben-win-2130-experiment-ol.windmill.pages.dev

View logs

@rubenfiszel rubenfiszel changed the title docs: experiment oliphaunt/pglite-oxide as lightweight dev mode (WIN-2130) fix(migrations): run bootstrap on migrator's held connection — enables embedded pglite dev DB (WIN-2130) Jul 6, 2026
@rubenfiszel

Copy link
Copy Markdown
Contributor Author

The migration-bootstrap fix in this PR has been broken out as a standalone, independently-mergeable PR: #9970. That's the durable, broadly-useful change (it also helps connection-constrained managed Postgres / PgBouncer) and can merge on its own.

This PR (#9967) remains the full WIN-2130 experiment — the dev/embedded-db harness + write-up — kept self-contained (it includes the same fix) so it stays reproducible end-to-end. Once #9970 lands, this branch rebases cleanly onto it.

@rubenfiszel rubenfiszel force-pushed the ruben/win-2130-experiment-oliphaunt-as-lightweight-dev-mode branch from 938d85a to 30f9bdb Compare July 6, 2026 18:54
… (WIN-2130)

Standalone dev/embedded-db harness (boots embedded pglite Postgres, execs windmill against it; plus a schema-compat probe) and a write-up of the experiment. The enabling migration-bootstrap fix landed separately in #9970 (now on main).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rubenfiszel rubenfiszel force-pushed the ruben/win-2130-experiment-oliphaunt-as-lightweight-dev-mode branch from 30f9bdb to 8e7c1ce Compare July 6, 2026 19:03
@rubenfiszel rubenfiszel changed the title fix(migrations): run bootstrap on migrator's held connection — enables embedded pglite dev DB (WIN-2130) docs(experiment): oliphaunt/pglite-oxide as a lightweight dev-mode database (WIN-2130) Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant