MacPorts 2.7.0-beta1 sqlite error: attempt to write a readonly database

Joshua Root jmr at macports.org
Fri Apr 30 04:15:43 UTC 2021


On 2021-4-30 08:13 , Ryan Schmidt wrote:
> 
> 
> On Apr 29, 2021, at 10:32, Joshua Root wrote:
> 
>> It appears that SQLite version 3.35.5 as installed by the sqlite3 port deletes a database's -wal and -shm files at least some of the time when closing. SQLite version 3.28.0 as shipped as /usr/bin/sqlite3 on Catalina does not. The existence of these files is necessary to read a WAL mode database in a directory that you don't have write permission on.
> 
> https://sqlite.org/wal.html#avoiding_excessively_large_wal_files
> 
> "When the last connection to a database closes, that connection does one last checkpoint and then deletes the WAL and its associated shared-memory file, to clean up the disk."
> 

Yeah, that was the conclusion on the forum as well. The behaviour is 
documented, but older versions definitely do not do that. :)

Fortunately it's just one simple function call to ensure the persistence 
of the WAL files.

- Josh


More information about the macports-dev mailing list