SQLite Forum

Can I detect if the disk supports WAL mode?
Login
> two OS's do not know about each others locks

They probably can't do shared memory across the boundary, on purpose, else what's the point of containers? Cross-process memory access is the antithesis of containerization.

> flawlessly

In a one-line C call, no.

There are [methods][1] for detecting that one is running inside a Docker container, which may suffice, indirectly.

Short of that, the best I've got is to [run all of the WAL tests][2]. Find the one(s) that flag the problems, dig into the tests, and find out which failure modes are being triggered. That may allow you to distill the test to something small and cheap enough to run on application init.

It'll be brittle, though, detecting only your current failure case.

[1]: https://stackoverflow.com/a/48710609/142454
[2]: https://sqlite.org/src/dir?ci=trunk&name=test&re=wal*