Okay, thanks for your reply. I had been concerned that it is the only way to 
implement it by myself in the custom vfs.


-----Original Message-----
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp
Sent: Mittwoch, 22. April 2015 12:59
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Problems with pragma journal_mode

On 4/22/15, Janke, Julian <julian.janke at capgemini.com> wrote:
> The embedded system has various storage media, with different read /
> write speeds.
> A quick and dirty test shows that the outsourcing of the journal files
> on a faster medium may be a significant speed boost.
> Is there a possibility to write journal(temporarly) (and later wal
> files when I found the error) files to another directory as the main database?
> (temp_store_directory is marked as deprecated, and thus seems to be no
> option).
>

You can do this, and get away with it, in the highly controlled environment of 
a specific embedded application.  Just modify your custom VFS to automatically 
move journal files to a different directory.  Or even to give them completely 
different names.  As long as the same journal file always gets the same 
modified name whenever that name is used, everything should work.

Generic SQLite does *NOT* make this an option for a good reason.  When 
recovering from a power loss, it is critical that SQLite be able to check for 
the existence of and read the journal file, otherwise database corruption may 
result.  If journal files are on a different volume from the database files, 
then that volume might not be remounted upon reboot, or it might be mounted in 
a different place, thus preventing SQLite from locating the journal file.  We 
have no way to control this in the general case, except to ensure that journal 
files are always in exactly the same directory as the database.  But you can 
control this in your highly controlled and constrained environment, and hence 
you can get away with putting journal files on different volumes from the 
database.
--
D. Richard Hipp
drh at sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

________________________________

Firma: Capgemini Deutschland GmbH
Aufsichtsratsvorsitzender: Antonio Schnieder ? Gesch?ftsf?hrer: Dr. Michael 
Schulte (Sprecher) ? Jost F?rster ? Dr. Peter Lempp ? Dr. Volkmar Varnhagen

Amtsgericht Berlin-Charlottenburg, HRB 98814
This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.

Reply via email to