Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-17 Thread Angus March
Matt Sergeant wrote: On Fri, 14 Aug 2009 12:33:30 -0400, Angus March wrote: I want my INSERT done right away, I just don't want it to be flushed from the filesystem's write-behind cache until the kernel decides, not when SQLite decides. Did you mean you do want it to be flushed

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-17 Thread Matt Sergeant
On Mon, 17 Aug 2009 10:47:23 -0400, Angus March wrote: Because yes, that's what synchronous=OFF means. It stops SQLite from issuing fflush calls (effectively). Right, and this is implied by the documentation, but I was concerned that the documentation might be playing fast and loose,

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-17 Thread Angus March
Matt Sergeant wrote: On Mon, 17 Aug 2009 10:47:23 -0400, Angus March wrote: Because yes, that's what synchronous=OFF means. It stops SQLite from issuing fflush calls (effectively). Right, and this is implied by the documentation, but I was concerned that the documentation

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-17 Thread Simon Slavin
On 17 Aug 2009, at 3:47pm, Angus March wrote: I was concerned that the documentation might be playing fast and loose, saying that fflush (or fsync, or fdatasync) won't be called, when it really means that it won't be called during any call to step() or finalize(), while it would be called

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-17 Thread Shane Harrelson
On Mon, Aug 17, 2009 at 11:53 AM, D. Richard Hipp d...@hwaci.com wrote: On Aug 17, 2009, at 11:41 AM, Matt Sergeant wrote: Kernels will fflush when a file handle is closed Not according to Ted Ts'o (creator of the Ext2/3/4 filesystems). See, for example, the extensive discussions of

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-17 Thread Angus March
Shane Harrelson wrote: To the original question though, with PRAGMA synchronous=OFF, SQLite will NOT do explicit fsync()'s. A exception to this occurs with attached DB's and a transaction; when the transaction is committed and the master journal is deleted, SQLite fsyncs the directory that

[sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-14 Thread Angus March
I need to know that if I turn of the synchronous that no synching will be done, up to, and including, when the session is closed. I'm asking, because my program just INSERTs once per session, so if a synch gets done when the session closes, that's pretty useless.

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-14 Thread Simon Slavin
On 14 Aug 2009, at 5:25pm, Angus March wrote: I need to know that if I turn of the synchronous that no synching will be done, up to, and including, when the session is closed. I'm asking, because my program just INSERTs once per session, so if a synch gets done when the session closes,

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-14 Thread Angus March
Simon Slavin wrote: On 14 Aug 2009, at 5:25pm, Angus March wrote: I need to know that if I turn of the synchronous that no synching will be done, up to, and including, when the session is closed. I'm asking, because my program just INSERTs once per session, so if a synch gets done when

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-14 Thread Simon Slavin
On 14 Aug 2009, at 5:33pm, Angus March wrote: I want my INSERT done right away, Then do not turn off synchronous ! I just don't want it to be flushed from the filesystem's write-behind cache until the kernel decides, not when SQLite decides. SQLite cannot control how your operating system

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-14 Thread Matt Sergeant
On Fri, 14 Aug 2009 12:33:30 -0400, Angus March wrote: I want my INSERT done right away, I just don't want it to be flushed from the filesystem's write-behind cache until the kernel decides, not when SQLite decides. Did you mean you do want it to be flushed from the filesystem's