PGlite
A strong pick. 5th of 10 database drivers.
PGlite is Postgres compiled to WebAssembly. It runs inside a Node, Bun, Deno or browser process with no server, so it is an embedded database rather than a driver for a remote server. It is the best way to get real Postgres in tests, local development and in-browser apps, but its single connection and pre-1.0 status make it a poor substitute for a server Postgres in production.
Best for: Teams on Postgres who want a real Postgres database, with no Docker or server, for tests, local development, browser apps or agent sandboxes.
Scores
Overall7.6
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It is clearly the best pick for in-process Postgres: tests, local development, browser apps and agent sandboxes. It is well funded and widely embedded. It does not replace node-postgres or Postgres.js for talking to a production Postgres server, because of its single connection, WASM overhead and 0.x API. Use it next to one of those drivers, not instead of one.
- pglite.dev/docs/pglite-socket: Single-connection limit
- news.ycombinator.com/item?id=46146133: Users praise it for tests and report its limits
- thenewstack.io/databricks-electric-wasm-agentic-postgres: Databricks backing and direction
- npm downloadsLast4Weeks: Fast growth, though partly through other tools that install it
GPT-6.2 Sol: 8.1, likely 7.0 to 9.0
PGlite is a strong pick when an app or test suite needs embedded PostgreSQL. It combines a familiar SQL engine with browser persistence, a typed API, and active maintenance. For a Node.js service connecting to a shared PostgreSQL server, node-postgres is the better fit because it provides connection pooling. PGlite's single-session design and upgrade work for persisted data limit the recommendation.
- pglite.dev/docs: Documents embedded setup, persistence, and the single-connection architecture.
- docs.prisma.io/docs/local-development/postgres: Established integration for local development and isolated testing.
- pglite.dev/docs/upgrade: Persistent databases can require migration across minor releases.
- node-postgres.com/features/pooling: Documents the peer's built-in pool for shared PostgreSQL servers.
- npm latestVersion, npm versionsLastYear: Current release is 0.5.17 with 27 core versions in the past year.
Needed by many4.7
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.5
Most Postgres users can use it for tests and local development, which is a sizeable group. Few need it as their main runtime database outside browser, local-first or agent-sandbox apps. That makes it narrower than a general driver like node-postgres.
- electric.ax/blog/2026/06/25/pglite-reaches-10-million-weekly-downloads: Main uses: tests, local dev without Docker, local AI, browser sandboxes
- news.ycombinator.com/item?id=46146133: Users mostly report test and CI use, with some in-browser production use
GPT-6.2 Sol: 4.3, likely 3.2 to 5.5
PostgreSQL has broad demand, and PGlite serves a distinct subset of that work. Browser apps, local development, and database tests can use it across several JavaScript runtimes. Its API runs an embedded database, and the share of developers who need that setup is poorly measured.
- survey.stackoverflow.co/2026/technology/data#databases: PostgreSQL leads database interest in the 2026 survey.
- pglite.dev/docs/about: Describes the embedded engine, runtimes, and use cases.
- pglite.dev/docs/pglite-socket: Optional socket server multiplexes clients over one database connection.
Helps a lot7.7
How well does it do the job for those who need it?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It gives full Postgres semantics in-process, with extensions, types, zero dependencies and broad ORM support. Users report test runs about 5x faster. Its clear limits are a single connection, WASM performance and size, missing extensions, and issues with some bundlers. For the jobs it targets, nothing else is close.
- pglite.dev/docs/pglite-socket: Only one simultaneous connection; the multiplexer has caveats
- raw.githubusercontent.com/reisepass/zeropg/HEAD/docs/LIMITATIONS.md: Field report: session serialisation, prepared-statement collisions, deadlock risk
- news.ycombinator.com/item?id=46146133: Praise for real Postgres in tests; complaints about size, perf and Turbopack
- npm hasTypes / dependencies: Ships its own types and has 0 dependencies
GPT-6.2 Sol: 8.3, likely 7.2 to 9.3
Version 0.5.17 runs PostgreSQL 18.7 and supports transactions, live queries, and extensions. The documented parameterized templates give developers and coding agents a straightforward query pattern, and callers supply their own TypeScript row shapes. One backend session limits concurrency, and startup costs vary by workload. A third-party timing put a fresh instance at about 0.7 seconds on one machine using 0.5.8, so current performance has a wider range.
- github.com/electric-sql/pglite/releases/tag/@electric-sql%2Fpglite@0.5.17: Confirms the PostgreSQL 18.7 build.
- pglite.dev/docs/api: Documents transactions, parameterization, and caller-supplied row types.
- pglite.dev/extensions: Lists live queries, pgvector, and PostGIS.
- pglite.dev/docs/filesystems: IndexedDB persistence loads the database into memory.
- geekychris.github.io/tools/postgres: A playground author explains why lock tests require a separate server mode.
- shibukawa.github.io/pgmem/why-pgmem: A competing tool's author measured 712 ms to the first query on 0.5.8.
Holds up over time7.8
Will it still be a good choice in two years?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
Development is active: 173 commits, 27 core versions and a push one day before the read date, from 92 contributors. Databricks bought Electric in August 2026, which brings funding and a strategic fit with Lakebase and Neon. The team has said the code stays open source. Risks are the 0.x versioning and a possible shift in priorities after the acquisition.
- github commitsLastYear / contributors: 173 commits and 92 contributors
- npm versionsLastYear: 27 releases of the core package in a year
- databricks.com/en/blog/electric-joins-databricks-bring-wasm-postgres-ai-agent-sandboxes: Databricks acquisition; PGlite stays open source
- techtarget.com/data-technologies/news/366649200/Databricks-Electric-acquisition-adds-embeddable-PostgreSQL: Independent coverage of the deal and its strategy
GPT-6.2 Sol: 8.0, likely 6.8 to 9.1
The core package shipped 27 versions in the past year, and maintainers closed one reported transaction bug in three days. Databricks brought in the Electric team and named PGlite in its plans for agent sandboxes. Minor upgrades can require a dump and restore, and the long-term maintenance commitment under Databricks is still young.
- npm versionsLastYear, github commitsLastYear, github releasesLastYear: 27 core npm versions and 173 repo commits. The 362 tags span multiple packages.
- github.com/electric-sql/pglite/issues/1179: A transaction rollback reporting bug was closed as fixed in three days.
- databricks.com/blog/electric-joins-databricks-bring-wasm-postgres-ai-agent-sandboxes: Databricks brought in Electric and named PGlite in its plans.
- pglite.dev/docs/upgrade: Documents dump and restore across minor versions.
- github.com/electric-sql/pglite/releases/tag/@electric-sql%2Fpglite@0.5.0: The 0.5 upgrade moved several extensions to separate packages.
Used widely6.7
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Downloads grew about 25.7x in a year, against a 4.1x median, to 162M per 4 weeks. Much of that comes indirectly from tools like the Prisma and Firebase CLIs, so direct choices are fewer than the raw number suggests. 16k stars and a 605-point HN story show strong developer interest. ecosyste.ms has no dependents count, which keeps the range wide.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 162.0M vs 6.3M, a ratio of about 25.7 against a 4.1 median
- github stars: 16,353 stars, the most among the peers
- hackerNews top: Front-page story with 605 points
- electric.ax/blog/2026/06/25/pglite-reaches-10-million-weekly-downloads: Downloads driven by embedding in Prisma, Firebase, Netlify and other tools
GPT-6.2 Sol: 6.4, likely 4.8 to 8.0
Four-week npm installs rose from 6.3 million to 162 million, about 25.7× the prior year and well above the 4.1× catalog median. That growth beat node-postgres and trailed Postgres.js. Automated installs and dependencies such as Prisma's tooling inflate the total, while browser CDN use can bypass npm. npm lists about 500 dependent packages, and the missing ecosyste.ms count leaves direct repository adoption hard to estimate.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: PGlite grew 25.7×, node-postgres 8.3×, and Postgres.js 29.1×.
- dependents, github stars, bluesky posts, peers: The repo leads these peers in stars and Bluesky links. ecosyste.ms has no count.
- npmjs.com/package/%40electric-sql/pglite?activeTab=dependents: npm lists 508 dependent packages.
- github.com/prisma/prisma-cli/blob/main/pnpm-lock.yaml: Prisma CLI tooling pulls PGlite in through @prisma/dev.
- pglite.dev/docs: Documents direct browser use through a CDN.
Vouched for7.7
Who stands behind it being good?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
Prisma, Firebase, Supabase, Netlify and Bolt.new build on it. Drizzle and Supabase use it in their test suites. Databricks paid to acquire it. Independent tutorials and HN users report good results. There are no survey data, and most validation is for tests and local use, not production servers.
- makerkit.dev/blog/tutorials/unit-testing-prisma-vitest: Independent kit vendor uses it for Prisma/Drizzle service tests
- supabase.com/blog/database-build-live-share: Supabase builds database.build on in-browser PGlite
- infoworld.com/article/4209184/databricks-acquires-electric-to-bring-local-postgres-databases-to-agentic-apps.html: Databricks acquisition coverage
GPT-6.2 Sol: 7.8, likely 6.6 to 8.8
Prisma uses PGlite for its local Postgres command, Supabase built its browser sandbox on it, and Drizzle offers a dedicated adapter. Developers report that it simplifies integration tests, while some have hit differences when moving from local tests to hosted Postgres. The strongest evidence comes from tooling, sandboxes, and tests. Broader production use and PGlite-specific survey results are harder to establish.
- docs.prisma.io/docs/local-development/postgres: PGlite powers the documented prisma dev workflow.
- supabase.com/blog/database-build-live-share: Supabase used PGlite as the engine for database.build.
- orm.drizzle.team/docs/connect-pglite: Drizzle maintains a dedicated integration.
- news.ycombinator.com/item?id=47703805: Users describe easier integration tests and gaps around pooling and scaling.
Safe8.0
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It has no known advisories, zero runtime dependencies and the permissive Apache-2.0 licence. Postgres runs inside a WASM sandbox. There is no OpenSSF Scorecard. The monorepo publishes very often (362 releases across its packages) as a large WASM binary that is hard to audit, which keeps it below the top.
- advisories total: 0 advisories
- npm dependencies / license: 0 dependencies, Apache-2.0
- scorecard: No Scorecard data
- github releasesLastYear: 362 releases across the monorepo's packages
GPT-6.2 Sol: 8.0, likely 6.8 to 9.1
The core package has zero npm runtime dependencies, permissive licensing, and zero PGlite advisories in the supplied OSV data. GitHub Actions is configured for npm trusted publishing, and PGlite shipped PostgreSQL 18.7 seven days after its upstream security release. The bundled database engine still needs regular patching. The missing OpenSSF Scorecard and the absence of a published GitHub security policy widen the range.
- npm dependencies, npm license, advisories total, scorecard: Zero runtime dependencies, Apache-2.0, zero OSV advisories, and no Scorecard result.
- github.com/electric-sql/pglite#license: Offers Apache-2.0 or PostgreSQL License terms.
- github.com/electric-sql/pglite/blob/main/.github/workflows/build_and_test.yml: Release workflow uses OIDC for npm trusted publishing.
- github.com/electric-sql/pglite/releases/tag/@electric-sql%2Fpglite@0.5.17: GitHub Actions published the PostgreSQL 18.7 upgrade on November 19.
- postgresql.org/docs/release/18.7: Upstream shipped PostgreSQL 18.7 security fixes on November 12.
- github.com/electric-sql/pglite/security: GitHub lists no security policy or published repository advisories.
Good
- It is real Postgres behaviour, with extensions such as pgvector, in one npm install with zero dependencies.
- Tests become fast and isolated without Docker, and Drizzle, Prisma, Kysely, Knex, TypeORM and MikroORM support it.
- It runs in browsers, workers and Node/Bun/Deno, with optional persistence and live queries.
- Electric, now part of Databricks, maintains it actively with frequent releases.
Bad
- Only one connection is possible, and the socket multiplexer has edge cases with prepared statements and concurrent writes.
- It is still at 0.x, so the API and storage format can change between minor versions.
- WASM brings a download of about 3 MB, slower startup and lower throughput than native Postgres or SQLite.
- It is not meant for production server workloads, and some extensions, such as PostGIS and TimescaleDB, are missing or still in progress.
The numbers
- npm downloads, 4 weeks
- 162M ×26 in a year
- GitHub stars
- 16k
- Commits, 12 months
- 173
- npm version
- 0.5.17 Nov 2026
- Versions, 12 months
- 27
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- None
- Licence
- Apache-2.0
Postgres compiled to WebAssembly. It runs in the app, with no server.
Read on 21 November 2026 from GitHub (electric-sql/pglite), npm (@electric-sql/pglite), OSV and the OpenSSF Scorecard.
Database drivers
- 8.7node-postgres
- 8.2MongoDB driver
- 8.1better-sqlite3
- 8.0MySQL2
- 7.6PGlite
- 7.5Postgres.js
- 7.4DuckDB Node Neo
- 7.1Neon serverless driver
- 5.9libSQL client
- 1.9node-sqlite3