How do I properly close a DuckDb database?

Thanks for this. It’s not only that the connection is not closed properly. One can’t even open a read only connection to a duckdb file in Julia when the file is in use on another process. There’s a flag to do this in Python.

config = DuckDB.Config()
DuckDB.set_config(config, "access_mode", "READ_ONLY")

db = DuckDB.DB("C:\\Temp\\test.duckdb", config)