Show HN: PGlite – in-browser WASM Postgres with pgvector and live sync (opens in a new tab)pglite.dev
509 pointsPGlite is a WASM Postgres build packaged into a TypeScript/JavaScript client library, that enables you to run Postgres in the browser, Node.js and Bun, with no need to install any other dependencies. It's 3mb Gzipped, now has support for many Postgres extensions, including pgvector, and it has a reactive "live query" API. It's also fast, with CRUD style queries executing in under 0.3 ms, and larger, multi-row select queries occurring within a fraction of a single frame.
PGlite started as an experimental project we shared on X, and the response to it was incredible, encouraging us to see how far we could take it. Since then we have been working to get it to a point where people can use it to build real things. We are incredibly excited as today, with the release of v0.2, the Supabase team has released the amazing http://postgres.new site built on top of it. Working with them to deliver both PGlite and postgres.new has been a joy.
- https://pglite.dev - PGlite website
- https://github.com/electric-sql/pglite - GitHub repo
- https://pglite.dev/docs - Docs on how to use PGlite
- https://pglite.dev/extensions - Extensions catalog
- https://pglite.dev/benchmarks - Early micro-benchmarks
- https://pglite.dev/repl - An online REPL so that you can try it in the browser
We would love you to try it out, and we will be around to answer any questions.

Comments (108) 37 threads
Show all comments
Showing thread 25 of 37
UH, could you do:
bare_metal --> HeadlessGPU-Chrome --> PGLite with whatever orchesrtration and you have a an automatable 'browser' that can scrape/store/logic/log/be-config'd from/lookup directly to your browserDB
and maybe run a fastAPI ontop of such that you have a full stack, baremetal, headless, browserDB/fastAPI/endpoint processing doohicky?
Or does this sound dumb?
Because this is exactly what I actually need and am attempting to create - but its beyond my capabilities in any functional/elegant implementation...
https://www.browserless.io/blog/browserless-gpu-instances
https://github.com/dhamaniasad/HeadlessBrowsers
So, you can basically use this to deploy a portable fully enclosed little webapp.
Basically any little web-app that has a bunch of backend DB:
A sales USB drive that loads a page that then has the pglite of all your product stuff on there. and you can just provide custom buttons to slurp data either way.
Utils to yank a [data] from a postgress server, onto your little sneaker-DB-USB -- then carry it over and to a DB function...
A little util USB that you already have it setup such that you can curl a bunch of data directly into tables on your little headless-browser-pglite minion?
Full Kisok DB USB (SSD) upgrades.
Basically - running a pico headless postgress DB with a webUI?
--- aside:
samwillis March 2008
samstave March 2009
:-)
---
WOW:
https://i.imgur.com/6YLwEuj.png
--
Yeah this is pretty dopes.
Continue this thread — 1 reply
There is a very good reason for it. EC2 is way way overpriced.