← Back to context

Comment by nextaccountic

7 days ago

Which one? https://github.com/Ladybug-Memory/pgembed or https://github.com/faokunega/pg-embed ?

Both will either download or ship the postgres binary with your app, and run it in a separate process. Pglite is different, it's actually a library (they have stripped some parts of the postgres source code) and it could in principle be ported to be used as a native library (meaning, you link to it and run as a single program)

There's even a draft PR to do this, but it became stale

https://github.com/electric-sql/pglite/pull/842

Right now what exists is, grabbing the pglite wasm and running it on native code on wasi

https://github.com/f0rr0/pglite-oxide

The first one. It's forked from pgserver.

Yes, what you get is a multi-server postgres under the covers. But for many users, the convenience of "uv pip install...", auto clean up via context manager is the higher order bit that takes them to SQLite.

Of course the bundled extensions are the key differentiator.

With enough distribution and market opportunities we (yes, there is a for profit company behind it) can invest in making it truly embedded.

frick this gotta be the tenth time ive read about pglite here and i always go look for native library. shame pr became stale, webapps simply arent always my end game. thanks for putting pglite-oxide on my radar tho, this is an interesting almost-there i can tinker with.

  • I am always checking out this project too, looking for a native build. I am quite happy that they added support for extensions though