Keep in mind there are two ways to think about SQLite. Most commonly, as these comments show, it's thought of as a library. An embedded SQL engine. The second is as a simple CLI-friendly SQL database. Minipg is more about the latter use.
That said, PGlite is great and would have been ideal for the motivating problem, but as my blog post mentions (eventually), it only runs in single connection mode. For better or worse, applications will sometimes perform another query while in another transaction, causing deadlock with PGlite. It's fine if you can avoid that in your app, but makes it not work as a general drop-in replacement for existing apps.
The way I'd rather it be looked at, though, is just as a more convenient, "friendly" way to work with Postgres on the CLI. So maybe it's not for Postgres experts.
> The second is as a simple CLI-friendly SQL database.
If one needs an ACID database, he would also like programs to perform CRUD operations upon it, which requires a stable ABI. I can't see why one would want a CLI relational database. On the other hand, embedded OLAP databases such as DuckDB are mostly CLI-first and lib-second.
That said, PGlite is great and would have been ideal for the motivating problem, but as my blog post mentions (eventually), it only runs in single connection mode. For better or worse, applications will sometimes perform another query while in another transaction, causing deadlock with PGlite. It's fine if you can avoid that in your app, but makes it not work as a general drop-in replacement for existing apps.
The way I'd rather it be looked at, though, is just as a more convenient, "friendly" way to work with Postgres on the CLI. So maybe it's not for Postgres experts.
Replies (1)
If one needs an ACID database, he would also like programs to perform CRUD operations upon it, which requires a stable ABI. I can't see why one would want a CLI relational database. On the other hand, embedded OLAP databases such as DuckDB are mostly CLI-first and lib-second.