logoalt Hacker News

samwillistoday at 12:04 PM11 repliesview on HN

Hey everyone, I work on PGlite. Excited to see this on HN again.

If you have any questions I'll be sure to answer them.

We recently crossed a massive usage milestone with over 3M weekly downloads (we're nearly at 4M!) - see https://www.npmjs.com/package/@electric-sql/pglite

While we originally built this for embedding into web apps, we have seen enormous growth in devtools and developer environments - both Google Firebase and Prisma have embedded PGlite into their CLIs to emulate their server products.


Replies

mpweihertoday at 1:05 PM

This looks really interesting...but why WASM-only? Naively it seems like WASM-ification would be a 2nd step, after lib-ification.

Obviously missing something...

show 3 replies
JackCtoday at 2:19 PM

Thanks for your work!

Is the project interested in supporting http-vfs readonly usecases? I'm thinking of tools like DuckDB or sql.js-httpvfs that support reading blocks from a remote url via range requests.

Curious because we build stuff like this https://news.ycombinator.com/item?id=45774571 at my lab, and the current ecosystem for http-vfs is very slim — a lot of proofs of concept, not many widely used and optimized libraries.

I have no idea if this makes sense for postgres — are the disk access patterns better or worse for http-vfs in postgres than they are in sqlite?

sgttoday at 5:34 PM

Any chance for a Flutter library?

glenjamintoday at 2:22 PM

Does pglite in memory outperform “normal” postgres?

If so then supporting the network protocol so it could be run in CI for non-JS languages could be really cool

show 2 replies
phplovesongtoday at 1:28 PM

This looks REALLY awesome. Could you name a few usecases when i would want to use this. Is the goal to be an sqlite/duckdb alternative?

nnnnicotoday at 12:47 PM

This is awesome, thanks for your work! Could this work with the file system api in the bowser to write to user disk instead of indexeddb? I'm interested in easy ways for syncing fot local-first single user stuff <3 thanks again

mentalgeartoday at 12:26 PM

Yupp, this has big potential for local-first !

DonnyVtoday at 3:58 PM

I see you guys are working on supporting the postgis extension. This would be HUGE!!! The gis community would be all over this.

If anyone wants to help out who has compiled the postgis extension and is familiar with WASM. You can help out here. https://github.com/electric-sql/pglite/pull/807

TheDataMavericktoday at 12:59 PM

Amazing work! It makes setting up CI so much easier.

show 1 reply
reachableceotoday at 12:55 PM

Well downloads doesn’t equal usage does it ?

How do you know how many deployments you actually have in the wild?

show 1 reply
oulipo2today at 12:12 PM

I'm interested to use Pglite for local unit-testing, but I'm using timescaledb in prod, do you think you will have this extension pre-built for Pglite?

show 3 replies