EN
Back to the archive

The archive · Developer & Business Tools · Product decision · 2024–2026

ElectricSQL's PGlite bet Postgres in the browser: WASM build, 15M downloads

A 3MB WASM Postgres that runs in the browser, Node and Bun — with pgvector and live queries — went from an X experiment to Supabase's postgres.new base.

ElectricSQL

The betThat developers would choose real Postgres embedded in the browser — a 3MB WASM library with pgvector and live queries — over SQLite stand-ins or remote databases.Live

What the business is

ElectricSQL, the startup behind reactive sync tooling around Postgres, builds PGlite: a WASM build of Postgres packaged as a TypeScript/JavaScript client library that runs full Postgres in the browser, Node, Bun and Deno, with live queries, live sync, and extensions including pgvector and PostGIS.

How it started

Sam and the team at ElectricSQL, a startup building reactive, realtime, local-first tooling around Postgres, shared an experimental WASM Postgres build on X. The response was extraordinary, encouraging them to see how far they could take it and to push the experiment to a point where people could use it to build real things.

What happened

On 2024-08-12 they released v0.2 — extension loading including pgvector, a reactive live-query API, about 3MB gzipped — and the same day the Supabase team launched postgres.new, an in-browser Postgres playground built on PGlite. The Show HN drew 509 points and 108 comments: developers described it as filling the gap where only Dockerized Postgres had sat for test suites and in-process embedding, while skeptics probed maturity and noted the single-user limitation.

No ending yet — it is still running.

Background

PGlite is a WASM build of PostgreSQL packaged as a TypeScript/JavaScript client library, made by ElectricSQL — a startup building reactive, realtime, local-first data tooling around Postgres. It lets developers run a full Postgres database in the browser, Node, Bun or Deno with no other dependencies: about 3MB gzipped, with extension loading for pgvector and PostGIS, persistence to filesystem or IndexedDB, and a reactive live-query API.

The bet behind it was that developers building in-browser and local-first apps would choose real Postgres — with its extensions, dialect and sync story — instead of settling for SQLite stand-ins or forcing a remote database. PGlite started as an experimental project the team shared on X; the response was extraordinary enough that ElectricSQL kept pushing it toward production use, solving the hard problem of compiling Postgres to WASM despite its process-forking model by building on Postgres's single-user mode.

On 2024-08-12, v0.2 shipped with pgvector and live-query support, and the same day Supabase launched postgres.new, an in-browser Postgres playground built on PGlite. The Show HN reached 509 points with 108 comments — developers called it the gap where only Dockerized Postgres had sat — while critics tested its limits and noted the single-user constraint. By the 2026-09-05 snapshot, pglite.dev showed 15.9k GitHub stars and 15.2M npm downloads, with the package still actively published.

What has to be true

  • Embedding real Postgres removed the SQLite compromise: teams could run the same dialect, extensions and queries in tests and in-process as they ran in production.
  • The hard engineering problem — Postgres forks processes and WASM cannot — was solved by reusing Postgres's single-user mode, turning a "can't be done" into a 3MB library.
  • Open sourcing it made adoption the marketing: Supabase, a separate company, launched postgres.new on PGlite the same day as v0.2, giving ElectricSQL distribution it could not have bought.
  • Reactive live queries and sync pointed beyond a toy: the product page framed PGlite as embeddable Postgres "with reactivity and live sync," the layer local-first apps need.

What can be applied

Prove the impossible part first: by shipping an embeddable 3MB WASM Postgres as open source, ElectricSQL turned "Postgres in the browser" from a claim into an artifact developers could adopt.

Aftermath

As of 2026-09-05, PGlite is live and broadly adopted as an open-source library. The pglite.dev snapshot showed 15.9k GitHub stars for electric-sql/pglite and 15.2M npm downloads for @electric-sql/pglite; the npm package stood at version 0.5.8, described as "the WASM build of Postgres from Electric" for building reactive, realtime, local-first apps, dual-licensed under Apache-2.0 and the PostgreSQL license. ElectricSQL's own funding or revenue is not documented in the reviewed sources; this entry records the product bet and its adoption.

Sources

spotted an error? The archive wants to know.

Your turn

You just read one. Describe what you are building, and see who is betting on the same thing.

Free account · 3 free questions · no card

Related cases