Re: [sqlite] -wal and -shm files left behind by libsqlite3.dylib

2019-01-28 Thread Scott Perry
This is expected behaviour. As Richard guessed, the system libsqlite3.dylib is 
built with SQLITE_ENABLE_PERSIST_WAL. For Darwin systems, the compromise of 
keeping the extra 4MiB (max) file around is generally worth the reduced I/O 
overhead that results from creating, resizing, and unlinking files.

If you need, you can still override this behaviour using the 
SQLITE_FCNTL_PERSIST_WAL opcode to the sqlite3_file_control() interface.

Scott


On Jan 28, 2019, at 10:32, Carsten Müncheberg  
wrote:
> 
> When loading and using /usr/lib/libsqlite3.dylib (3.19.3) which is shipped
> with MacOS 10.13.6 I noticed that the -wal and -shm files are not deleted
> when closing the last connection to a database. I tested this with the
> sqlite3 command line tool. It does not happen when I compile and link
> SQLite myself.
> 
> Is this expected behavior or some kind of bug?
> 
> Carsten

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] -wal and -shm files left behind by libsqlite3.dylib

2019-01-28 Thread Carsten Müncheberg
Am Mo., 28. Jan. 2019 um 20:01 Uhr schrieb Richard Hipp :

> On 1/28/19, Carsten Müncheberg  wrote:
> > When loading and using /usr/lib/libsqlite3.dylib (3.19.3) which is
> shipped
> > with MacOS 10.13.6 I noticed that the -wal and -shm files are not deleted
> > when closing the last connection to a database. I tested this with the
> > sqlite3 command line tool. It does not happen when I compile and link
> > SQLite myself.
> >
> > Is this expected behavior or some kind of bug?
>
> My guess is that Apple is enabling persistent WAL mode
> (
> https://www.sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal
> )
> by default on their build of the SQLite library.
>

Must be it, thanks for the swift reply.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] -wal and -shm files left behind by libsqlite3.dylib

2019-01-28 Thread Richard Hipp
On 1/28/19, Carsten Müncheberg  wrote:
> When loading and using /usr/lib/libsqlite3.dylib (3.19.3) which is shipped
> with MacOS 10.13.6 I noticed that the -wal and -shm files are not deleted
> when closing the last connection to a database. I tested this with the
> sqlite3 command line tool. It does not happen when I compile and link
> SQLite myself.
>
> Is this expected behavior or some kind of bug?

My guess is that Apple is enabling persistent WAL mode
(https://www.sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal)
by default on their build of the SQLite library.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] -wal and -shm files left behind by libsqlite3.dylib

2019-01-28 Thread Carsten Müncheberg
When loading and using /usr/lib/libsqlite3.dylib (3.19.3) which is shipped
with MacOS 10.13.6 I noticed that the -wal and -shm files are not deleted
when closing the last connection to a database. I tested this with the
sqlite3 command line tool. It does not happen when I compile and link
SQLite myself.

Is this expected behavior or some kind of bug?

Carsten
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users