[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] fsync/fdatasync problem on UBIFS
From:       "Ronny Dierckx" <ronny.dierckx () telenet ! be>
Date:       2009-11-26 18:23:43
Message-ID: 000f01ca6ec5$96b3d120$c41b7360$ () dierckx () telenet ! be
[Download RAW message or body]

>> I'm using SQLite 3.6.20 on an ARM Linux device which uses the UBIFS
>> filesystem (on OneNAND flash).
>>
>> When I perform a database update, and cut the power a few seconds  
>> later, the
>> changes are rolled back
>> when the device restarts. This is because after the restart the  
>> journal file
>> has re-appeared in the filesystem.
>> If I perform a manual sync command in the shell before cutting the  
>> power,
>> everything works fine.
>> Does anyone else have experience with running SQLite on UBIFS?
>>
>> Before switching to UBIFS we were using our application on a JFFS2
>> filesystem without any problems.
>
>Not a solution, but you could try experimenting with
>"PRAGMA journal_mode=persist" or "PRAGMA journal_mode=truncate"
>to work around the problem.
>
>Dan.


Using "PRAGMA journal_mode=truncate" made no difference, the journal
reappeared with file size > 0.

But "PRAGMA journal_mode=persist" fixes the problem, the database is no
longer rolled back after a power cut.

Thanks,

Ronny Dierckx


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic