← Back to context

Comment by roywiggins

21 hours ago

pglite runs in wasm so it should be possible to embed it where you want, like sqlite?

Why would I want wasm for an embedded database? It's not a feature, quite an anti-feature frankly.

edit: it looks like pglite is only useful for web apps

  • Not really, I used it to develop against a "real" postgres database for a node backend app. It worked fine and made it pretty easy to spin up a development/CI environment anywhere you want. Only when inserting large amounts of data you start to notice it is slower than native postgres. I had to stop using it because we required the postgis extension (although there is some movement on that front!).

  • > it looks like pglite is only useful for web apps

    Where else other than web apps (herein meaning network-attached database servers that, more often than not, although not strictly so, use HTTP as the transport layer) are at meaningful risk of bumping up against SQLite write contention? If your mobile/desktop app has that problem, it is much more likely that you have a fundamental design issue and not a scaling problem.