Improve backup export speed

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-03-11 19:59:57 -05:00
committed by GitHub
parent e53d115a4f
commit a27a0a6a9e
6 changed files with 77 additions and 16 deletions

View File

@@ -276,6 +276,12 @@ export class MainSQL {
duration: number;
}>;
if (method === 'pageBackupMessages' && this.#pauseWaiters == null) {
throw new Error(
'pageBackupMessages can only run after pauseWriteAccess()'
);
}
// pageMessages runs over several queries and needs to have access to
// the same temporary table, it also creates temporary insert/update
// triggers so it has to run on the same connection that updates the tables