[Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)
Florian Festi
notifications at github.com
Mon Nov 18 08:30:36 UTC 2024
Check if there is 20MB in free pages and then execute a VACUUM command. The threshold can be controlled by the _sqlite_vacuum macro. Don't add this to the macros file on purpose as we don't want people to get involved with such details. Here it is mainly used for testing.
Using a 20 MB threshold should prevent the vacuuming to happend too often while still triggering after large transactions. As we install new headers first and then remove the old ones transactions leave behind large amounts of free pages.
We do not use PRAGMA auto_vacuum here as it does not defrag the database and only frees empty pages. So it still requires running VACUUM from time to time. Freeing the empty pages would get rid of the condition we use here for running VACUUM.
Using pure C for the macro expansion on purpopse in case we want to back port this.
Resolves: #3309
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/3452
-- Commit Summary --
* Vacuum the sqlite rpmdb if necessary
-- File Changes --
M lib/backend/sqlite.cc (25)
M tests/rpmdb.at (17)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/3452.patch
https://github.com/rpm-software-management/rpm/pull/3452.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3452
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3452 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241118/999c7307/attachment-0001.htm>
More information about the Rpm-maint
mailing list