Re: [sqlite] WAL file size increase

2018-11-13 Thread Simon Slavin
On 14 Nov 2018, at 4:20am, Sharma, Tanuj [AUTOSOL/FMP/IN] wrote: > I want to know why auto_checkpoint is not working when there is no Primary > Key in the table. If, during your testing, you're using existing database files, please create new ones each time. Can you please publish your sche

Re: [sqlite] WAL file size increase

2018-11-13 Thread Richard Hipp
On 11/13/18, Sharma, Tanuj [AUTOSOL/FMP/IN] wrote: > I have observed that when I don't have any primary key in the database table > then WAL auto_checkpoint doesn't work That's surprising because the WAL logic does not have anything to do with primary keys. Those are two completely independent s

[sqlite] WAL file size increase

2018-11-13 Thread Sharma, Tanuj [AUTOSOL/FMP/IN]
Dear SQL Developers / Users, I am using Sqlite3 in our project. My database has journal_mode set to WAL and has one writer & multiple readers. During normal mode of operation, only writing process is accessing database and there is no active reader connection I have observed that when I don't ha

Re: [sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread Dan Kennedy
On 12/19/2014 11:22 AM, Kushagradhi Bhowmik wrote: I am writing continuously into a db file which has PRAGMA journal_mode=WAL, PRAGMA journal_size_limit=0. My C++ program has two threads, one reader(queries at 15 sec intervals) and one writer(inserts at 5 sec intervals). Every 3 min I am pausing

Re: [sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread GB
Readers do not need long-lasting transactions (if any at all), so I'd rather suspect your writer to be the culprit. Does it use lasting transactions? If so, make it commit the transaction before checkpointing. regards gerd ___ sqlite-users mailing lis

[sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread Kushagradhi Bhowmik
I am writing continuously into a db file which has PRAGMA journal_mode=WAL, PRAGMA journal_size_limit=0. My C++ program has two threads, one reader(queries at 15 sec intervals) and one writer(inserts at 5 sec intervals). Every 3 min I am pausing insertion to run a sqlite3_wal_checkpoint_v2() from

Re: [sqlite] WAL file size

2011-12-06 Thread Lukas Gebauer
> *The prgama PRAGMA journal_size_limit = **N , *does not seem to limit > the size of the WAL log file. Is there any precondition to be > satisfied before calling the pragma ? I have same problem (on Windows). See this console session: SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for i

Re: [sqlite] WAL file size

2011-12-03 Thread Sreekumar TP
Hello Richard, *The prgama PRAGMA journal_size_limit = **N , *does not seem to limit the size of the WAL log file. Is there any precondition to be satisfied before calling the pragma ? -Sreekumar On Wed, Nov 30, 2011 at 7:04 PM, Teg wrote: > Hello Richard, > > When does the WAL get trimmed do

Re: [sqlite] WAL file size

2011-11-30 Thread Teg
Hello Richard, Thanks again. Wednesday, November 30, 2011, 5:37:32 PM, you wrote: RH> On Wed, Nov 30, 2011 at 5:31 PM, Teg wrote: >> Since we're on this topic >> >> If I open a 30 GB DB file, then attach a new empty DB and then >> select/insert all the data from the full DB to th

Re: [sqlite] WAL file size

2011-11-30 Thread Richard Hipp
On Wed, Nov 30, 2011 at 5:31 PM, Teg wrote: > Since we're on this topic > > If I open a 30 GB DB file, then attach a new empty DB and then > select/insert all the data from the full DB to the empty one, the WAL > file grows to 4 times the size of the source file. Why is that? > > I

Re: [sqlite] WAL file size

2011-11-30 Thread Teg
Since we're on this topic If I open a 30 GB DB file, then attach a new empty DB and then select/insert all the data from the full DB to the empty one, the WAL file grows to 4 times the size of the source file. Why is that? I don't believe I use any manual checkpointing. Just let WA

Re: [sqlite] WAL file size

2011-11-30 Thread Simon Slavin
On 30 Nov 2011, at 7:01pm, Richard Hipp wrote: > The wal file persists until the last connection to the database closes, > then the wal file is deleted. Actually this is the key to a lot of questions about this. If your WAL file is taking up too much space, quit and restart your app. Or have

Re: [sqlite] WAL file size

2011-11-30 Thread Teg
Hello Richard, That's what I was hoping to hear. Thanks, Wednesday, November 30, 2011, 2:01:46 PM, you wrote: RH> On Wed, Nov 30, 2011 at 1:39 PM, Teg wrote: >> Hello Richard, >> >> Appreciate the reply but, it doesn't address my question (unless I'm >> missing something). I get that checkpo

Re: [sqlite] WAL file size

2011-11-30 Thread Richard Hipp
On Wed, Nov 30, 2011 at 1:39 PM, Teg wrote: > Hello Richard, > > Appreciate the reply but, it doesn't address my question (unless I'm > missing something). I get that checkpointing doesn't reduce the size > of the WAL. Assuming a single writer and no readers, If I perform a > transaction that gen

Re: [sqlite] WAL file size

2011-11-30 Thread Richard Hipp
nformation Systems > > > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] > on behalf of Richard Hipp [d...@sqlite.org] > Sent: Wednesday, November 30, 2011 12:10 PM > To: Teg; General Discussion of SQLite Database > Subject

Re: [sqlite] WAL file size

2011-11-30 Thread Teg
Hello Richard, Appreciate the reply but, it doesn't address my question (unless I'm missing something). I get that checkpointing doesn't reduce the size of the WAL. Assuming a single writer and no readers, If I perform a transaction that generates a WAL file. Does it eventually get deleted when I

Re: [sqlite] WAL file size

2011-11-30 Thread Black, Michael (IS)
g; General Discussion of SQLite Database Subject: EXT :Re: [sqlite] WAL file size On Wed, Nov 30, 2011 at 1:04 PM, Teg wrote: > Hello Richard, > > When does the WAL get trimmed down? If my transaction completes, does > the WAL file get deleted? I've seen the WAL grow to 4 times my act

Re: [sqlite] WAL file size

2011-11-30 Thread Richard Hipp
On Wed, Nov 30, 2011 at 1:04 PM, Teg wrote: > Hello Richard, > > When does the WAL get trimmed down? If my transaction completes, does > the WAL file get deleted? I've seen the WAL grow to 4 times my actual > DB size so, I don't really want 160 Gigs of WAL hanging out when the > process that

Re: [sqlite] WAL file size

2011-11-30 Thread Sreekumar TP
Hi Richard, How does sqlite determine the right size for the WAL file? Application can ofcourse indicate the maximum size. -Sreekumar On Wed, Nov 30, 2011 at 4:02 PM, Richard Hipp wrote: > On Wed, Nov 30, 2011 at 4:41 AM, Sreekumar TP >wrote: > > > Hello, > > > > I have sqlite configure to do

Re: [sqlite] WAL file size

2011-11-30 Thread Teg
Hello Richard, When does the WAL get trimmed down? If my transaction completes, does the WAL file get deleted? I've seen the WAL grow to 4 times my actual DB size so, I don't really want 160 Gigs of WAL hanging out when the process that generated it is only run once a month. Wednesday, Novem

Re: [sqlite] WAL file size

2011-11-30 Thread Filip Navara
On Wed, Nov 30, 2011 at 4:02 PM, Richard Hipp wrote: > On Wed, Nov 30, 2011 at 4:41 AM, Sreekumar TP >wrote: > > > Hello, > > > > I have sqlite configure to do manual checkpoint. I do checkpoint every > few > > hundred records. I expect the WAL to reduce in size and become zero when > > there ar

Re: [sqlite] WAL file size

2011-11-30 Thread Richard Hipp
On Wed, Nov 30, 2011 at 4:41 AM, Sreekumar TP wrote: > Hello, > > I have sqlite configure to do manual checkpoint. I do checkpoint every few > hundred records. I expect the WAL to reduce in size and become zero when > there are no more inserts done. > However, I see that the WAL file size is stati

[sqlite] WAL file size

2011-11-30 Thread Sreekumar TP
Hello, I have sqlite configure to do manual checkpoint. I do checkpoint every few hundred records. I expect the WAL to reduce in size and become zero when there are no more inserts done. However, I see that the WAL file size is static and does not reduce in size. Why isnt manual checkpoint reduci

Re: [sqlite] wal file size

2011-02-19 Thread Michael Barton
On Thu, Feb 10, 2011 at 6:04 PM, Richard Hipp wrote: > There needs to be a time when there are no read or write transactions using > the WAL so that it can reset, and you need to run PRAGMA wal_checkpoint > during that time.  Otherwise the WAL will grow without bound. > > See also the RESET option

Re: [sqlite] wal file size

2011-02-10 Thread Richard Hipp
On Thu, Feb 10, 2011 at 6:45 PM, Michael Barton wrote: > Is there something I need to do to keep my sqlite WAL files from > getting huge with 3.7.5? > > -rw--- 1 swift swift 152M 2011-02-10 23:43 > b7fa56688b61c70ef29ed2ad94b7beeb.db > -rw--- 1 swift swift 19M 2011-02-10 23:43 > b7fa56688

[sqlite] wal file size

2011-02-10 Thread Michael Barton
Is there something I need to do to keep my sqlite WAL files from getting huge with 3.7.5? -rw--- 1 swift swift 152M 2011-02-10 23:43 b7fa56688b61c70ef29ed2ad94b7beeb.db -rw--- 1 swift swift 19M 2011-02-10 23:43 b7fa56688b61c70ef29ed2ad94b7beeb.db-shm -rw--- 1 swift swift 2.4G 2011-02-

Re: [sqlite] WAL file size

2010-12-08 Thread Richard Hipp
On Tue, Dec 7, 2010 at 9:49 AM, Yoni Londner wrote: > Hi, > > Yes, in this scheme the checksum is based on salt values and own frame > content.a > > Note that the current design solve a potential DB corruption bug in > sqlite. current WAL design is base on the fact that once sqlite writes > pages

Re: [sqlite] WAL file size

2010-12-07 Thread Yoni Londner
Hi, It's clear that for the WAL to be a general purpose solution, which can be used in systems which have constant stream of reads/writes from sqlite, it should not grow limitlessly under all circumstances (assuming the user run a checkpoint every once in a while). I think my design can work (

Re: [sqlite] WAL file size

2010-12-07 Thread Dan Kennedy
On 12/07/2010 09:49 PM, Yoni Londner wrote: > Hi, > > Yes, in this scheme the checksum is based on salt values and own frame > content.a > > Note that the current design solve a potential DB corruption bug in > sqlite. current WAL design is base on the fact that once sqlite writes > pages successfu

Re: [sqlite] WAL file size

2010-12-07 Thread Yoni Londner
Hi, Yes, in this scheme the checksum is based on salt values and own frame content.a Note that the current design solve a potential DB corruption bug in sqlite. current WAL design is base on the fact that once sqlite writes pages successfully to the WAL, they will never get corrupted. but this

Re: [sqlite] WAL file size

2010-12-02 Thread Dan Kennedy
In the current WAL format, the checksum for each frame is based on the contents of the frame, the salt-values in the wal header and the checksum of the previous frame. In this scheme is each frame checksum independent? i.e. each frame checksum is computed based only on the salt values in the WAL

Re: [sqlite] WAL file size

2010-12-02 Thread Yoni Londner
Hi, I meant to run the checkpoint in another thread (see my attached example program), but it can be even from another process. What happens when it crashes? well, the programmer have to decide how he handle checkpoints. he can use auto_checkpoint, he can stop auto_checkpoint and do checkpoint

Re: [sqlite] WAL file size

2010-12-02 Thread Pavel Ivanov
You seem to use such term as "background checkpointing". What's that? Who runs this background process and what happens when it crashes (when all other readers/writers are still working)? Pavel On Thu, Dec 2, 2010 at 11:04 AM, Yoni Londner wrote: > Hi, > > I will start out by stating that I am

Re: [sqlite] WAL file size

2010-12-02 Thread Yoni Londner
Hi, I will start out by stating that I am not deeply familiar with the sqlite & WAL file layout, but I will try anyway, from my current understanding: The general problem that needs to be solved is to allow SQLITE to be constantly used over time (with no 'idle' time where no sql operations ar

Re: [sqlite] WAL file size

2010-11-29 Thread Pavel Ivanov
> Well, I love sqlite, and I want to continue using it (small, fast, > reliable ...). > I think it is better to solve such problems inside sqlite It's impossible. Just try to design the solution you want. Think of how SQLite should behave to make you happy, think of it with all details and don't f

Re: [sqlite] WAL file size

2010-11-28 Thread Yoni Londner
Hi, > For a large scale system you have a third choice: use some other RDBMS > which is implemented in one process and has a much better control over > its data and much better communication between readers and writers. Well, I love sqlite, and I want to continue using it (small, fast, reliabl

Re: [sqlite] WAL file size

2010-11-25 Thread Pavel Ivanov
mplementation than what currently >> exists. I imagine it's quite a task for the SQLite developers to >> get 100% branch test coverage. >> >> On one system of mine, where blocking is an issue, I >> buffer up the write messages, and flush them on a background thread. >

Re: [sqlite] WAL file size

2010-11-25 Thread Ben Harper
ni Sent: 25 November 2010 11:08 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] WAL file size Hi, > In which case the writer would have to block on the reader, > which is something that the current system doesn't suffer from. I agree when we are talking about small systems, which

Re: [sqlite] WAL file size

2010-11-25 Thread Yoni
coverage. > > On one system of mine, where blocking is an issue, I > buffer up the write messages, and flush them on a background thread. > Of course this may not be practical for you... > > Ben > > -Original Message- > From: sqlite-users-boun...@sqlite.org &

Re: [sqlite] WAL file size

2010-11-24 Thread Ben Harper
lf Of Yoni Sent: 24 November 2010 04:46 PM To: sqlite-users@sqlite.org Subject: [sqlite] WAL file size Hi, I am currently developing a system, which have the following requirements: 1. should be very fast and responsive 2. run forever (or at least a very long time) without restart. 3. have steady s

[sqlite] WAL file size

2010-11-24 Thread Yoni
Hi, I am currently developing a system, which have the following requirements: 1. should be very fast and responsive 2. run forever (or at least a very long time) without restart. 3. have steady stream of writes to the DB. Currently I am using sqlite with one sql connection, and I run sql checkp