PGlite
Data
embedded database
SHOW HN2024
How HN took it
28 positive, 37 neutral or asking, 0 mixed, 6 critical, out of 71 comments about the project. Thread score +0.30.
Idea: 20 for, 0 againstExecution: 3 for, 3 againstDocs: 1 for, 2 againstPerformance: 1 for, 0 againstPrivacy: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Removes need for Docker for dev and testing
From 3 comments
Huge fan of PGlite. It's the perfect solution to have Postgres without the need of Docker. With just `npm install`, you can have a Postgres instance on your computer. So, it's…
creativedg on HNYes, it's very cool alternative and it removes the need for docker compose for dev environment. On top of it, PGlite also perfect for CI and testing.
creativedg on HNThat's great! Corpo beancounters want us to move off docker on EC2 onto bare metal, making both dev and deploy experience terrible. This will help ease pain!
isoprophlex on HN
Useful for integration testing with real Postgres
From 2 comments
I recently experimented with using pglite for API integration tests in one of my side projects. It worked pretty well and has much better DX than using something like…
bezbac on HNPGLite is amazing for integration testing of queries against a real in-memory db. Is it possible to use PGLite for that purpose in non-JS environments, like e.g. golang?
loevborg on HN
Small 3MB download is impressive
From 1 comment
I'd seen this running in a browser before (the ~3MB download is really impressive for that), but I hadn't clocked that it runs server-side with Node.js and Bun as well:…
simonw on HN
Objections
Performance and persistence limits compared with native Postgres
From 2 comments
It'll be interesting how well this works out in practice. I don't know how they modified the persistence layer of PG, but I could imagine that there are limitations compared to…
WuxiFingerHold on HNHow does the performance compare to actual postgres?
namanyayg on HN
Live query and Safari storage limitations
From 1 comment
The filesystems page at https://pglite.dev/docs/filesystems says the following: > "We would recommend using the IndexedDB VFS in the browser at the current time as the OPFS VFS…
cheema33 on HN
Requests
Support for languages beyond JavaScript
From 3 comments
I'd seen this running in a browser before (the ~3MB download is really impressive for that), but I hadn't clocked that it runs server-side with Node.js and Bun as well:…
simonw on HNCongrats on the Show HN. I follow the ElectricSQL Discord server and I was distinctly interested in this but for other languages than TypeScript, so it's nice to see that making…
satvikpendem on HNPGLite is amazing for integration testing of queries against a real in-memory db. Is it possible to use PGLite for that purpose in non-JS environments, like e.g. golang?
loevborg on HN
Native library build
From 1 comment
Does there happen to be a native analog to this? So like, if I eventually want some kind of native app, I wouldn't have to throw away the architecture entirely and start over? I…
saurik on HN
JavaScript functions inside the database
From 1 comment
Awesome work! A killer feature of sqlite that I would love to see in pglite would be javascript window functions.
makkesk8 on HN
Questions
How does it compare to SQLite and DuckDB
From 3 comments
Normally I'd say the main difference between postgres and SQLite is that the latter is in-process. Now that they can both be in-process, is there a more detailed comparison of…
Retr0id on HNOh cool, how would you compare this to DuckDB?
sam_perez on HNWould really like to see a benchmarking analysis vs SQLite. How do they compare on memory usage and overhead? I already default to SQLite for new side projects with the idea that…
non- on HN
Can it be used with at-rest encryption
From 1 comment
Anyone know how this would play with at-rest encryption extensions?
blueprint on HN
Alternatives named
SQLite
From 2 comments
Normally I'd say the main difference between postgres and SQLite is that the latter is in-process. Now that they can both be in-process, is there a more detailed comparison of…
Retr0id on HNWould really like to see a benchmarking analysis vs SQLite. How do they compare on memory usage and overhead? I already default to SQLite for new side projects with the idea that…
non- on HN
Docker Postgres or testcontainers
From 2 comments
I recently experimented with using pglite for API integration tests in one of my side projects. It worked pretty well and has much better DX than using something like…
bezbac on HNDefinitely interesting, though I often just use docker compose for dev dependencies, this is definitely a cool alternative.
tracker1 on HN
DuckDB
From 1 comment
Oh cool, how would you compare this to DuckDB?
sam_perez on HN