shrink memory

This commit is contained in:
andrew (from workstation) 2020-01-07 14:49:47 +01:00
parent a051e67314
commit 3d4fdae800

View File

@ -293,6 +293,7 @@ class MessagesDbImpl : public MessagesDbSyncInterface {
if (seqno_ % 8128 == 0) {
TRY_STATUS(db_memory_.exec("DELETE FROM messages WHERE seqno < " + to_string(seqno_ - 7168)));
TRY_STATUS(db_.exec("PRAGMA shrink_memory"));
}
add_message_stmt_.bind_int32(12, seqno_).ensure();