[tracker/direct-access: 1/121] libtracker-db: Enable Write-Ahead Logging in SQLite
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access: 1/121] libtracker-db: Enable Write-Ahead Logging in SQLite
- Date: Thu, 22 Jul 2010 14:43:56 +0000 (UTC)
commit 8b18ca294b8af4d8b2c99c8c2ab642b3cc650f62
Author: Jürg Billeter <j bitron ch>
Date: Mon Jun 28 15:57:42 2010 +0200
libtracker-db: Enable Write-Ahead Logging in SQLite
This requires SQLite 3.7 and allows us to drop read_uncommitted.
src/libtracker-data/tracker-db-manager.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 756e496..086cc20 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -265,11 +265,7 @@ db_set_params (TrackerDBInterface *iface,
tracker_db_interface_execute_query (iface, NULL, "PRAGMA encoding = \"UTF-8\"");
tracker_db_interface_execute_query (iface, NULL, "PRAGMA auto_vacuum = 0;");
- /* if we add direct access library (or enable running queries in parallel with updates,
- we need to disable read_uncommitted again
- however, when read_uncommitted is disabled, we need the custom page cache (wrapper)
- to avoid locking issues between long running batch transactions and queries */
- tracker_db_interface_execute_query (iface, NULL, "PRAGMA read_uncommitted = True;");
+ tracker_db_interface_execute_query (iface, NULL, "PRAGMA journal_mode = WAL;");
if (page_size != TRACKER_DB_PAGE_SIZE_DONT_SET) {
g_message (" Setting page size to %d", page_size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]