From c15caad5c3b693c43491621dc5018e69a48051b7 Mon Sep 17 00:00:00 2001 From: Christiaan Landman Date: Thu, 30 Jan 2025 16:02:04 +0200 Subject: [PATCH] Temporary store memory workaround. --- packages/powersync-op-sqlite/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/powersync-op-sqlite/README.md b/packages/powersync-op-sqlite/README.md index 0b6137709..e348b7f76 100644 --- a/packages/powersync-op-sqlite/README.md +++ b/packages/powersync-op-sqlite/README.md @@ -104,6 +104,21 @@ const factory = new OPSqliteOpenFactory({ }); ``` +## Using the Memory Temporary Store + +For some targets like Android 12/API 31, syncing of large datasets may cause disk IO errors due to the default temporary store option (file) used. +To resolve this you can use the `memory` option, by adding the following configuration option to your application's `package.json` + +```json +{ + // your normal package.json + // ... + "op-sqlite": { + "sqliteFlags": "-DSQLITE_TEMP_STORE=2" + } +} +``` + ## Native Projects This package uses native libraries. Create native Android and iOS projects (if not created already) by running: