π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[server][db] Tweak autovacuum threshold for trash table
Neeraj Guptadaaf73664a25
diff --git a/server/migrations/102_trash_vaccume_and_analyze_threshold.down.sql b/server/migrations/102_trash_vaccume_and_analyze_threshold.down.sqlnew file mode 100644index 0000000000..3d2dc0b0bf--- /dev/null+++ b/server/migrations/102_trash_vaccume_and_analyze_threshold.down.sql@@ -0,0 +1,6 @@+ALTER TABLE trash RESET (+ autovacuum_analyze_scale_factor,+ autovacuum_vacuum_scale_factor,+ autovacuum_analyze_threshold,+ autovacuum_vacuum_threshold+ );\ No newline at end of filediff --git a/server/migrations/102_trash_vaccume_and_analyze_threshold.up.sql b/server/migrations/102_trash_vaccume_and_analyze_threshold.up.sqlnew file mode 100644index 0000000000..5d61312da7--- /dev/null+++ b/server/migrations/102_trash_vaccume_and_analyze_threshold.up.sql@@ -0,0 +1,6 @@+ALTER TABLE trash SET (+ autovacuum_analyze_scale_factor = 0.01, -- Trigger ANALYZE after 1% of rows change+ autovacuum_vacuum_scale_factor = 0.02, -- Trigger VACUUM after 2% of rows change+ autovacuum_analyze_threshold = 1000,+ autovacuum_vacuum_threshold = 1000+);