Live data from Hacker News

PGlite – Embeddable Postgres

pglite.dev

41–50 of 118 posts

Re: PGlite – Embeddable Postgres

#41

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 Fir…

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

Re: PGlite – Embeddable Postgres

#42
post #32

This looks impressive. Could someone familiar with Postgres internals explain the hidden trade-offs of this approach? I understand the obvious limitations of it being embedded/single-host, but I'm curious about the engine itself. Does running in this environment compromise standard features like ACID compliance, parallel query execution, or the ecosystem of tools/extensions we usually rely on?

You might want to have a look at our extensions catalog page: https://pglite.dev/extensions/

Re: PGlite – Embeddable Postgres

#43
Very neat.

Impressive performance: https://pglite.dev/benchmarks

Even has Drizzle ORM integration: https://orm.drizzle.team/docs/connect-pglite

I will explore this for use in my unit / integration tests. It looks pretty amazing.

I am confused why all my recent compiled tooling (tsgo, biomejs) are shipping native binaries (thus creating multiple binaries, one per supported platform) and not WASM tools that can run cross platform? Is it because of startup times, poor tooling, etc?

Re: PGlite – Embeddable Postgres

#44

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 Fir…

Well downloads doesn’t equal usage does it ?

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

Re: PGlite – Embeddable Postgres

#45

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 Fir…

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

Re: PGlite – Embeddable Postgres

#46

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 Fir…

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...

Re: PGlite – Embeddable Postgres

#48
post #37
post #28

Earlier quoted context omitted.

Yes! I (experimentally) compiled and packaged it for react-native. Postgres on iOS and Android https://github.com/electric-sql/pglite/pull/774

Glad to see it working in react native. It always surprises me that RN doesn't natively support wasm. I've had to avoid other wasm-based libraries, like loro, for that reason.

Yeah, it's unfortunate but it's not really react-native/facebook's fault. Apple doesn't allow any sort of JIT to run on iOS outside of their builtin webkit js engine. That means that AFAIK there's no way to run wasm at reasonable speed on iOS, which means react-native can't really support wasm.

Re: PGlite – Embeddable Postgres

#49

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 Fir…

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?

Re: PGlite – Embeddable Postgres

#50
This is interesting, I've been looking for something like this that I can use in unit/integration tests. I've used the mongodb memory server for testing but never found something like that for Postgres that didn't require running a full PG server instance...

Definitely going to try this out for tests and see how it goes.

Post reply on HN