[sqlite] journal file and its size

2015-07-15 Thread Simon Slavin
On 15 Jul 2015, at 6:40pm, Mayank Kumar (mayankum) wrote: > -what do you mean by journal file is created only when needed ? Is it not > true, that for any transactions it is always created. Yes, but many programs keep a connection to the database the whole time they're run, but seldom do

[sqlite] journal file and its size

2015-07-15 Thread Mayank Kumar (mayankum)
...@mailinglists.sqlite.org] On Behalf Of Clemens Ladisch Sent: Wednesday, July 15, 2015 5:43 AM To: sqlite-users at mailinglists.sqlite.org Subject: Re: [sqlite] journal file and its size Mayank Kumar (mayankum) wrote: > Sometimes we see the journal file not present on the system although > active transa

[sqlite] journal file and its size

2015-07-15 Thread Clemens Ladisch
Mayank Kumar (mayankum) wrote: > Sometimes we see the journal file not present on the system although > active transactions are ongoing. How is that possible since the > documentation says the journal file is always created in exclusive > mode ? The journal file is created only when it is needed.

[sqlite] journal file and its size

2015-07-15 Thread Mayank Kumar (mayankum)
Our application uses the following pragma with sqlite 3.7.7.1 PRAGMA synchronous=FULL; PRAGMA locking_mode=EXCLUSIVE"; I understand from the documentation that with exclusive mode the journal file is always created and never deleted until the exclusive mode is exited. Now my questions are:-

[sqlite] Fwd: Re: sqlite journal file question

2015-02-14 Thread R.Smith
On 2/14/2015 12:19 AM, Mayank Kumar (mayankum) wrote: > Thanks all for the responses. Just want to clarify the scenario one more > time:- > > -by syncing, I mean taking the modifications on the active machine and > sending over wire to another machine(in some proprietary format) , where >

[sqlite] sqlite journal file question

2015-02-14 Thread Simon Slavin
On 13 Feb 2015, at 10:19pm, Mayank Kumar (mayankum) wrote: > -by syncing, I mean taking the modifications on the active machine and > sending over wire to another machine(in some proprietary format) , where > there is a similar sqlite application which receives the records and the > records

[sqlite] sqlite journal file question

2015-02-13 Thread Mayank Kumar (mayankum)
] On Behalf Of R.Smith Sent: Friday, February 13, 2015 1:15 AM To: sqlite-users at sqlite.org Subject: Re: [sqlite] sqlite journal file question This was my initial reading too Paul, but reading the OP post again it could be either - who knows what is meant by "syncing". I also think this i

[sqlite] sqlite journal file question

2015-02-13 Thread Richard Hipp
On 2/13/15, Mayank Kumar (mayankum) wrote: > when we > do a rsync, does it make sense to copy the journal file Yes, yes. Emphatically, Yes. -- D. Richard Hipp drh at sqlite.org

Re: [sqlite] sqlite journal file question

2015-02-13 Thread R.Smith
This was my initial reading too Paul, but reading the OP post again it could be either - who knows what is meant by "syncing". I also think this is the main point for the OP - If by syncing he really means "copying the file" then Richard's advice, else if he means "adding via normal DB

Re: [sqlite] sqlite journal file question

2015-02-13 Thread Paul Sanderson
Richard I read that the db on the standby machine is being updated at a record by record level, i.e. not copied in its entirety. In this scenario I can't see the two db files being guaranteed binary compatible. Copying the journal across in this scenario would imo be a mistake. Paul

Re: [sqlite] sqlite journal file question

2015-02-12 Thread Richard Hipp
On 2/12/15, Mayank Kumar (mayankum) wrote: > Hi All > > We have two systems which are running in active/standby configuration. The > active machine, is actively writing sqlite transactions to a file abcd.db. > The standby is syncing the abcd.db file from the active machine

Re: [sqlite] sqlite journal file question

2015-02-12 Thread R.Smith
I don't think it can be done, and if it could be done, it would not be wise. The journal is owned and specific to a connection. a hot Journal for connection A on DB 1 cannot ever be used to roll back or affect in any way connection B on DB 2. However, when you say the "standby is syncing", I

Re: [sqlite] sqlite journal file question

2015-02-12 Thread Paul Sanderson
I would say no. The journal file stores pages referenced by page no and when replayed will write those pages back to the main DB at the appropriate physical offset. Although the content of your DB's at a logical level may be the same, it is unlikely that they will be exact copies at a binary level

[sqlite] sqlite journal file question

2015-02-12 Thread Mayank Kumar (mayankum)
Hi All We have two systems which are running in active/standby configuration. The active machine, is actively writing sqlite transactions to a file abcd.db. The standby is syncing the abcd.db file from the active machine on a communication channel and writing the delta records to the

Re: [sqlite] journal file is not removed when ATOMIC WRITE is enabled

2014-12-29 Thread Dan Kennedy
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

Re: [sqlite] journal file is not removed when ATOMIC WRITE is enabled

2014-12-28 Thread Yongil Jang
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

[sqlite] journal file is not removed when ATOMIC WRITE is enabled

2014-12-28 Thread 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>

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Richard Hipp
On Fri, Jan 21, 2011 at 9:18 PM, Artur Reilin wrote: > > We've thought about that before, but never could come up with a > reasonable > > suggestion. > > > > Something like an hash key in every db and also in a journal, if it is > created, the same key as well. So if the db

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Artur Reilin
> We've thought about that before, but never could come up with a reasonable > suggestion. > Something like an hash key in every db and also in a journal, if it is created, the same key as well. So if the db hash key and journal hash key doesn't match, the journal will not be used.

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread James Berry
Richard, On Jan 21, 2011, at 5:41 PM, Richard Hipp wrote: > On Fri, Jan 21, 2011 at 8:27 PM, James Berry wrote: > >> (1) Is there any API I can/should use to predictably get the name of >> the journal file so that I can delete it, without "knowing" what is should >> be?

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Scott Hess
On Fri, Jan 21, 2011 at 5:33 PM, Pavel Ivanov wrote: >>        (2) Are there any changes that can/should be made >> to sqlite3 so that it can identify the bogus journal in this >> scenario and discard it? > > Define the word "bogus". How should SQLite understand that the

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Richard Hipp
On Fri, Jan 21, 2011 at 8:27 PM, James Berry wrote: > I ran into an interesting problem today having to do with a left-over > journal file. > > When I first initialize my app, my general strategy is this: > >- Delete src.db, tmp.db, dst.db >- Copy a static copy

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Simon Slavin
On 22 Jan 2011, at 1:27am, James Berry wrote: > - Delete src.db, tmp.db, dst.db > - Copy a static copy of my database (src.db) to a well-known temporary > place (tmp.db). > - Make some changes to the database (add some indexes, etc) > - If everything has succeeded, copy

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Pavel Ivanov
>        (1) Is there any API I can/should use to predictably get the name of > the journal file so that I can delete it, without "knowing" what is should be? Suffix -journal is hardcoded and won't change in the future to keep compatibility (journals left by any previous version should be read

[sqlite] Deleting the sqlite journal file?

2011-01-21 Thread James Berry
I ran into an interesting problem today having to do with a left-over journal file. When I first initialize my app, my general strategy is this: - Delete src.db, tmp.db, dst.db - Copy a static copy of my database (src.db) to a well-known temporary place (tmp.db). - Make

[sqlite] Journal file not locked - problems with virus checkers

2010-07-12 Thread John Wood
I've been having an ongoing issue with some deployed code (Windows). Occasionally, operations would fail with the SQLITE_FULL error. I've now tracked this issue down to being caused by other processes (virus scanners) locking the journal file at sensitive times. (I'm fairly certain that the

Re: [sqlite] "-journal" file?

2009-04-02 Thread Eric Minbiole
> Whenever my phBB3 install is failing on the PPC Mac Mini, it appears > that SQLite is producing an empty database file (size 0) plus a file > with the same name plus "-journal" appended. What kind of error is > this? Does this mean SQLite somehow crashed out while attempting to > write

[sqlite] "-journal" file?

2009-04-02 Thread Zobeid Zuma
Whenever my phBB3 install is failing on the PPC Mac Mini, it appears that SQLite is producing an empty database file (size 0) plus a file with the same name plus "-journal" appended. What kind of error is this? Does this mean SQLite somehow crashed out while attempting to write to the

Re: [sqlite] Journal File Optimization

2007-06-18 Thread Christian Smith
Andre du Plessis uttered: How can one optimize the creation of the journal file. The problem is this, for our system which is an event based one each message needs to be insterted and committed to the database (guaranteed), this results in a commit per insert, this was obviously unacceptably

Re: [sqlite] Journal File Optimization

2007-06-18 Thread Dan Kennedy
On Mon, 2007-06-18 at 06:04 -0500, John Stanton wrote: > Andre du Plessis wrote: > > How can one optimize the creation of the journal file. The problem is > > this, for our system which is an event based one each message needs to > > be insterted and committed to the database (guaranteed), this

Re: [sqlite] Journal File Optimization

2007-06-18 Thread Andrew Finkenstadt
On 6/18/07, John Stanton <[EMAIL PROTECTED]> wrote: Andre du Plessis wrote: > How can one optimize the creation of the journal file. The problem is > this, for our system which is an event based one each message needs to > be insterted and committed to the database (guaranteed), this results in

Re: [sqlite] Journal File Optimization

2007-06-18 Thread John Stanton
Andre du Plessis wrote: How can one optimize the creation of the journal file. The problem is this, for our system which is an event based one each message needs to be insterted and committed to the database (guaranteed), this results in a commit per insert, this was obviously unacceptably slow

[sqlite] Journal File Optimization

2007-06-18 Thread Andre du Plessis
How can one optimize the creation of the journal file. The problem is this, for our system which is an event based one each message needs to be insterted and committed to the database (guaranteed), this results in a commit per insert, this was obviously unacceptably slow and according to the lists

Re: [sqlite] Journal file question

2007-04-20 Thread DragonK
On 4/19/07, Joe Wilson <[EMAIL PROTECTED]> wrote: --- DragonK <[EMAIL PROTECTED]> wrote: > I'm having the following problem: a sqlite database file is on an NTFS > filesystem, in a directory with no permissions to create new files, but only > to modify the original database. By using filemon

Re: [sqlite] Journal file question

2007-04-18 Thread Joe Wilson
--- DragonK <[EMAIL PROTECTED]> wrote: > I'm having the following problem: a sqlite database file is on an NTFS > filesystem, in a directory with no permissions to create new files, but only > to modify the original database. By using filemon i've noticed some access > denied errors when sqlite

Re: [sqlite] Journal file question

2007-04-18 Thread DragonK
On 4/18/07, Cesar Rodas <[EMAIL PROTECTED]> wrote: I think is imposible... what you need to do is to create a dbname.db-journalform a dbname.db and set permission to truncate, write, but not for delete.. that is what i suggest, but i didnt try it... If you're suggesting to create a dummy

Re: [sqlite] Journal file question

2007-04-18 Thread Cesar Rodas
I think is imposible... what you need to do is to create a dbname.db-journalform a dbname.db and set permission to truncate, write, but not for delete.. that is what i suggest, but i didnt try it... On 18/04/07, DragonK <[EMAIL PROTECTED]> wrote: Hi, I'm having the following problem: a

[sqlite] Journal file question

2007-04-18 Thread DragonK
Hi, I'm having the following problem: a sqlite database file is on an NTFS filesystem, in a directory with no permissions to create new files, but only to modify the original database. By using filemon i've noticed some access denied errors when sqlite attempted to create the journal files.

Re: [sqlite] Journal file not getting deleted

2006-11-24 Thread mithin
I have figured out where the problem is In one place I forgot to call sqlite3_finalize(ppStmt); Anyways, thanks a lot for your time. Thanks once again. mithin wrote: > > Thanks for replying. > > Here is what I do > > Open Database > > int err = 0; > sqlite3_stmt *ppStmt; > >

Re: [sqlite] Journal file not getting deleted

2006-11-24 Thread mithin
Thanks for replying. Here is what I do Open Database int err = 0; sqlite3_stmt *ppStmt; if(sqlite3_open(dbPath.toUtf8().data(),) != SQLITE_OK){//It opens the database correctly sqlite3_close(db); db = 0; return false; } //set the restore point //I thought this could

Re: [sqlite] Journal file not getting deleted

2006-11-24 Thread Lloyd
Are you forgetting to close the database? On Fri, 2006-11-24 at 02:03 -0800, mithin wrote: > Hi, > > In my application I am using SQLite 3 c++ API. Everything works fine till my > application is open. While doing any transaction a journal file is created. > Once I close the app, the journal file

[sqlite] Journal file not getting deleted

2006-11-24 Thread mithin
Hi, In my application I am using SQLite 3 c++ API. Everything works fine till my application is open. While doing any transaction a journal file is created. Once I close the app, the journal file is not getting deleted. Also, when I close open the application again, all the newly added data is

Re: [sqlite] Journal file corrouption on power failure .

2006-11-10 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > I have set PRAGMA synchronous=FULL; > Do your power-off-corruption thing and send me copies of both the journal file and the original database and I will see what I can find. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] Journal file corrouption on power failure .

2006-11-10 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > Hi, > >I have a question regarding powerfailure. I am using sqlite version 2.8.13 > . I am seeing that the database is getting corrupted after power failure > during delete database entry operation. > > Try setting PRAGMA synchronous=FULL; --

[sqlite] Journal file corrouption on power failure .

2006-11-10 Thread jayanth KP
Hi, I have a question regarding powerfailure. I am using sqlite version 2.8.13 . I am seeing that the database is getting corrupted after power failure during delete database entry operation. Here are my observation that may give you gugs some insight: 1. I see a journal file in the

Re: [sqlite] Journal file and EFS space

2006-10-12 Thread drh
chetana bhargav <[EMAIL PROTECTED]> wrote: > whats the optimal amount of EFS usually that we have to reserve so atleast > the user can delete one object from the table so that he can make further > deletes. > I think you will likely need 10-20K of space for the journal in some cases. In the

[sqlite] Journal file and EFS space

2006-10-11 Thread chetana bhargav
Hi, We are using embedded flash file system, now we have catch22 situation. When the EFS is full (we seeing this when we have <13k on EFS, ofcourse out of that 13k some will go for system) , the users aren't able to delete any content from the EFS. sqllite3_step() is returning error. We

Re: [sqlite] journal: file is encrypted or is not a database

2005-01-26 Thread Alexandre Silva
Ooops ... Actually the problem was caused by my test program, that remove de the database file in some cirunstances and left the journal file alone, so, when the new database is created there is a journal from a previous database and a clean database file ... It's all working fine now.

[sqlite] journal: file is encrypted or is not a database

2005-01-24 Thread Alexandre Silva
Hi, I'm new as a SqLite user, despite a read a lot about it. I downloaded SqLite 3.0.8 tarball sources and compiled it on MinGW following the instructions below (I found this instructions googling ...). It compiled and seems to work well with a Windows console test application I made. But