From cff97ea9be4ddad6a66d95f60c1e910cfbd1a363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Thomas?= Date: Thu, 3 Jan 2019 20:16:33 +0100 Subject: [PATCH] Fix #778: Defragment embedded HSQLDB database more frequently --- .../resources/liquibase/10.2/changelog.xml | 6 +++++ .../10.2/setup-hsqldb-checkpoint-defrag.xml | 23 +++++++++++++++++++ .../main/resources/liquibase/db-changelog.xml | 1 + 3 files changed, 30 insertions(+) create mode 100644 airsonic-main/src/main/resources/liquibase/10.2/changelog.xml create mode 100644 airsonic-main/src/main/resources/liquibase/10.2/setup-hsqldb-checkpoint-defrag.xml diff --git a/airsonic-main/src/main/resources/liquibase/10.2/changelog.xml b/airsonic-main/src/main/resources/liquibase/10.2/changelog.xml new file mode 100644 index 00000000..c49cfb30 --- /dev/null +++ b/airsonic-main/src/main/resources/liquibase/10.2/changelog.xml @@ -0,0 +1,6 @@ + + + diff --git a/airsonic-main/src/main/resources/liquibase/10.2/setup-hsqldb-checkpoint-defrag.xml b/airsonic-main/src/main/resources/liquibase/10.2/setup-hsqldb-checkpoint-defrag.xml new file mode 100644 index 00000000..c75b9bf3 --- /dev/null +++ b/airsonic-main/src/main/resources/liquibase/10.2/setup-hsqldb-checkpoint-defrag.xml @@ -0,0 +1,23 @@ + + + + + + + + + SET LOGSIZE 64; + Automatically run a CHECKPOINT when the log is above 64MB. + + + SET CHECKPOINT DEFRAG 32; + Automatically defragment on CHECKPOINT when the wasted space is above 32MB. + + + + + + diff --git a/airsonic-main/src/main/resources/liquibase/db-changelog.xml b/airsonic-main/src/main/resources/liquibase/db-changelog.xml index 59768f89..84cd6f97 100644 --- a/airsonic-main/src/main/resources/liquibase/db-changelog.xml +++ b/airsonic-main/src/main/resources/liquibase/db-changelog.xml @@ -11,4 +11,5 @@ +