What does HackerNews think of libsqlfs?
a library that implements a POSIX style filesystem on top of an SQLite database
I wired Postgres up for our local dev. I don't believe in mocking the database, so all our tests and local dev run against a real Postgres instance.
The main tricks:
- Store the Postgres installation in a known location.
- Set the dynamic loader path to the installation lib dir, e.g., LD_PRELOAD.
- Don't run CI as root (or patch out Postgres' check for root)
- Create and cache the data directory based on the source code migrations.
- Use clone file to duplicate the cached data directory to give to individual tests.
One thing I'd like to pursue is to store the Postgres data dir in SQLite [1]. Then, I can reset the "file system" using SQL after each test instead of copying the entire datadir.
https://github.com/guardianproject/libsqlfs
or something similar to check the potential for speed up.
As does:
https://github.com/guardianproject/libsqlfs
https://github.com/narumatt/sqlitefs
(I know nothing about these, just got them from a quick search)
Here's an example of someone doing that very thing.
gotta keep ourselves fully looped! ⥀
(is there perchance a repo available with your work? that'd be lovely to see.)
You can use something like libsqlfs [1] for POSIX file heuristics with sqlite as the backing store.
One HA single primary/multi-master solution to use sqlite may be drbd.
[0] https://www.sqlite.org/fasterthanfs.html [1] https://github.com/guardianproject/libsqlfs
already exists