Re: [sqlite] journal file is not removed when ATOMIC WRITE is enabled
On 12/29/2014 07:57 AM, Yongil Jang wrote: For more information, In pager_end_transaction() function, int bDelete = (!pPager->tempFile && sqlite3JournalExists(pPager->jfd)); <-- sqlite3JournalExists() returns 0 I think both of pager_end_transaction() and sqlite3JournalExists() functions work properly in this scenario. However, could it(two files are exist at the same time) make a problem? It's a curious situation, but should not cause a problem. When a new connection reads from the db for the first time, it will open and read the journal file in order to determine that it is not a hot-journal, then close it and proceed to open the db in wal mode. Once the db has been opened in wal mode, the cold journal file will be ignored completely. So the net effect will be a slight overhead when a connection opens its first read transaction on the db. Dan. 2014-12-29 9:40 GMT+09:00 Yongil Jang : Dear developers, Please, look at following instructions. 1) Add SQLITE_IOCAP_ATOMIC or SQLITE_IOCAP_ATOMIC4K flags to unixDeviceCharacteristics() function (or any OS related functions) 2) Add SQLITE_ENABLE_ATOMIC_WRITE to compile option 3) Compile 4) run sqlite3 - sqlite3 test.db 5) sqlite> pragma journal_mode=persist; 6) sqlite> create table a(id); 7) sqlite> pragma journal_mode=wal; 8) sqlite> insert into a values (1); With these instructions, 'test.db-journal' and 'test.db-wal' are exists at same time. Regards, Yongil Jang. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] journal file is not removed when ATOMIC WRITE is enabled
For more information, In pager_end_transaction() function, int bDelete = (!pPager->tempFile && sqlite3JournalExists(pPager->jfd)); <-- sqlite3JournalExists() returns 0 I think both of pager_end_transaction() and sqlite3JournalExists() functions work properly in this scenario. However, could it(two files are exist at the same time) make a problem? 2014-12-29 9:40 GMT+09:00 Yongil Jang : > Dear developers, > > Please, look at following instructions. > > 1) Add SQLITE_IOCAP_ATOMIC or SQLITE_IOCAP_ATOMIC4K flags to > unixDeviceCharacteristics() function (or any OS related functions) > 2) Add SQLITE_ENABLE_ATOMIC_WRITE to compile option > 3) Compile > 4) run sqlite3 - sqlite3 test.db > 5) sqlite> pragma journal_mode=persist; > 6) sqlite> create table a(id); > 7) sqlite> pragma journal_mode=wal; > 8) sqlite> insert into a values (1); > > With these instructions, 'test.db-journal' and 'test.db-wal' are > exists at same time. > > Regards, > Yongil Jang. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] journal file is not removed when ATOMIC WRITE is enabled
Dear developers, Please, look at following instructions. 1) Add SQLITE_IOCAP_ATOMIC or SQLITE_IOCAP_ATOMIC4K flags to unixDeviceCharacteristics() function (or any OS related functions) 2) Add SQLITE_ENABLE_ATOMIC_WRITE to compile option 3) Compile 4) run sqlite3 - sqlite3 test.db 5) sqlite> pragma journal_mode=persist; 6) sqlite> create table a(id); 7) sqlite> pragma journal_mode=wal; 8) sqlite> insert into a values (1); With these instructions, 'test.db-journal' and 'test.db-wal' are exists at same time. Regards, Yongil Jang. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users