Files
chatmail-core/src
link2xt f3a716fac6 sql: enable auto_vacuum=INCREMENTAL
Previously default of `auto_vacuum=NONE` was used.

`PRAGMA auto_vacuum=INCERMENTAL` allows running `PRAGMA
incremental_vacuum`. Unlike `VACUUM`, `PRAGMA incremental_vacuum`
frees unused pages without rebuilding the whole database, like the
`VACUUM` does, so it does not require additional disk space to build a
vacuumed copy of the database. This may even free enough space on the
disk to run `VACUUM` afterwards.

New setting will only be enabled for new databases or if the `VACUUM`
command runs successfully. Currently `VACUUM` is only executed on
backup export, but may fail nevertheless if there is not enough space
on the disk.

Also try to run `PRAGMA incremental_vacuum` during housekeeping. It
may not be the best strategy, but likely does not make any difference
under normal usage when the database only grows and there are no free
pages. Free pages are created only if enough data is deleted to free
at least one database page of 4096 bytes, for example when automatic
deletion of messages is deleted for the first time. In the future if
more data is placed into the database, like avatars and other blobs,
it may be necessary to revise this strategy, for example to keep some
free pages instead of removing all of them each time by querying
`PRAGMA freelist_pages` and running `PRAGMA incremental_vacuum(N)`.
2021-12-31 21:33:38 +00:00
..
2021-12-25 18:07:14 +00:00
2021-12-25 18:07:14 +00:00
2021-11-20 11:42:52 +01:00
2021-09-18 21:56:02 +03:00
2021-12-31 13:57:45 +00:00
2021-11-24 23:23:01 +01:00
2021-12-25 18:07:14 +00:00
2021-12-31 13:57:45 +00:00
2021-12-25 18:07:14 +00:00
2021-12-31 13:57:45 +00:00
2021-04-25 22:33:14 +03:00
2021-12-31 13:57:45 +00:00
2021-12-28 23:29:37 +01:00
2021-12-31 13:57:45 +00:00
2021-12-28 23:29:37 +01:00
2021-12-28 23:29:37 +01:00
2021-12-31 13:57:45 +00:00
2021-11-02 22:09:04 +01:00
2021-12-31 13:57:45 +00:00
2021-12-31 13:57:45 +00:00
2021-12-31 13:57:45 +00:00
2021-12-10 22:56:42 +00:00
2021-08-22 15:34:14 +02:00
2021-12-31 13:57:45 +00:00
2021-12-25 18:07:14 +00:00
2021-12-31 13:57:45 +00:00
2021-11-20 11:42:52 +01:00
2021-12-31 21:33:38 +00:00
2021-11-20 11:42:52 +01:00
2021-11-20 11:42:52 +01:00
2021-08-22 15:34:14 +02:00