Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a294dace authored by Daniel Micay's avatar Daniel Micay
Browse files

set default journal mode to TRUNCATE, not PERSIST

PERSIST causes data to linger in the journal beyond transactions, so
it interacts poorly with SECURE_DELETE. It's also not necessarily
faster, especially since it makes the page cache and SSD cache (if there
is one) colder by holding on to blocks that are no longer used.

The default chosen by upstream is DELETE, but TRUNCATE is a bit lighter
since it doesn't need to create/delete the file.

Change-Id: If790271c253a840df241980f538fc0d844ba7857
parent 62c74db2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1374,8 +1374,11 @@
         Choices are: OFF, DELETE, TRUNCATE, PERSIST and MEMORY.
         PERSIST may improve performance by reducing how often journal blocks are
         reallocated (compared to truncation) resulting in better data block locality
         and less churn of the storage media. -->
    <string name="db_default_journal_mode" translatable="false">PERSIST</string>
         and less churn of the storage media.

         The PERSIST mode results in data persisting in the journal beyond the life of
         a transaction, so it interacts poorly with SECURE_DELETE. -->
    <string name="db_default_journal_mode" translatable="false">TRUNCATE</string>

    <!-- Maximum size of the persistent journal file in bytes.
         If the journal file grows to be larger than this amount then SQLite will