Well no actually it just unpacks the tar file in a temp dir and runs the full postgres, but it mostly feels like what you describe (minus the single file part) and starts surprisingly fast. That would totally work for a little proof of concept (https://github.com/zonkyio/embedded-postgres)
Can you expand on this? How did you package postgres as a lib?
JDBC/ODBC/DB-API/Sequelize ORM (ignoring the ORM part).
This used to be one of the major use cases for SQLite - running automated tests and being able to throw away the database file (or manage it at different points in the tests).
> ignoring the ORM part
As it should be :)
In the case of JDBC and ODBC (and I think DB-API) thats all they do.
And I have a wrapper that does it in a shell.
This makes it possible to run MySQL-dependent tests, in parallel, on a dev machine, without too much misery.
(MySQL is awful. Don’t use it for new designs. MariaDB isn’t obviously better. AWS RDS MySQL is, in my considered opinion after wasting days on it, even worse. RDS CANNOT INGEST THE OUTPUT OF mysqldump WITHOUT ILL-CONSIDERED AND POORLY DOCUMENTED KLUDGES!!! WTF!! Don’t get me started on how defective every MySQL replication mode is.)
I was actually reading up on this this the other day (doing a bit of a breadth first search of multi-master replication in industry).
I thought the way it worked was... interesting. Sounds like it's just as interesting in production.
https://duckdb.org/why_duckdb.html
> SQL Parser: We use the PostgreSQL parser that was repackaged as a stand-alone library. The translation to our own parse tree is inspired by Peloton.
Personally I want the opposite direction, a sort of Postgres-lite that uses a single flat file and lives inside a lib, for things where the power of the full thing isn't needed yet but I want to design my backend code against a Postgres interface. I've seen Wasm Postgres examples, and maybe there are others, but nothing mainstream. And yes there was this SQL standard that everything was supposed to conform to, but that went out the window long ago.