Earlier quoted context omitted.
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
for CI you can already use postgresql with "eat-my-data" library ? I don't know if there's more official image , but in my company we're using https://github.com/allan-simon/postgres-eatmydata
PGlite – Embeddable Postgres
71–80 of 118 posts
Re: PGlite – Embeddable Postgres
#72Re: PGlite – Embeddable Postgres
#73The result is a PG server that fully lives in your browser: https://dbfor.dev
Re: PGlite – Embeddable Postgres
#74Earlier quoted context omitted.
huh. could you tell how you use it in ci?
I'm using it for a service that has DB dependencies. Instead of using SQLite in tests and PG in production, or spinning up a Postgres container, you use Postgres via pglite. In my case, the focus is on DX ie faster tests. I load shared database from `pglite-schema.tgz` (~1040ms) instead of running migrations from a fresh DB and then use transaction rollback isolation (~10ms per test). This is a lot faster and more co…
Re: PGlite – Embeddable Postgres
#75This 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?
The key limitation (at the moment) is that it only supports a single connection. W're planning to lift that limitation though.
Re: PGlite – Embeddable Postgres
#76Hey 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…
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
Re: PGlite – Embeddable Postgres
#77Very 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 cro…
Re: PGlite – Embeddable Postgres
#78Re: PGlite – Embeddable Postgres
#79Re: PGlite – Embeddable Postgres
#80For unit testing, I still use TestContainers which spins a full Postgres in Docker. But new alternatives like this make py-pglite ( https://github.com/wey-gu/py-pglite ) possible which is Python unit testing with PGlite. Even so, for Python unit testing I'm more confident in something like pgserver ( https://github.com/orm011/pgserver ) which offers the full, real Postgres in a lightweight pip package. Note: my take…