Re: [sqlite] Effect of using WAL on technical support

2011-04-11 Thread Samuel Neff
Thanks for confirming this.  I did some more testing and turned off
connection pooling in SQLite.NET and then the connections got closed
correctly.

I'll plan on rewriting my own connection pool implementation and not using
the one provided by the wrapper.

Sam


On Sun, Apr 10, 2011 at 10:08 PM, Simon Slavin  wrote:

>
> On 11 Apr 2011, at 2:48am, Richard Hipp wrote:
>
> > On Sun, Apr 10, 2011 at 9:36 PM, Samuel Neff 
> wrote:
> >
> >> I'm sorry, my statement was misleading.  I'm referring to immediately
> after
> >> our application is closed.
> >>
> >> We're seeing that even if the application is gracefully shut down, the
> -wal
> >> and -shm files are still there.  In order to clear them I need to open
> the
> >> database files with sqlite3.exe and issue a "pragma wal_checkpoint".
> >
> > The -wal and -shm are deleted when the last connection to the database
> > closes.  If you are having -wal and -shm files left over, that implies
> that
> > you are not closing all your database connections before you exit.
>
> Yes !  If your application has exited and you still have a journal file,
> something is wrong.  Are you closing your connection correctly, however
> ASP.NET wants you to do it ?
>
> Simon.
> ___
> 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] Effect of using WAL on technical support

2011-04-10 Thread Simon Slavin

On 11 Apr 2011, at 2:48am, Richard Hipp wrote:

> On Sun, Apr 10, 2011 at 9:36 PM, Samuel Neff  wrote:
> 
>> I'm sorry, my statement was misleading.  I'm referring to immediately after
>> our application is closed.
>> 
>> We're seeing that even if the application is gracefully shut down, the -wal
>> and -shm files are still there.  In order to clear them I need to open the
>> database files with sqlite3.exe and issue a "pragma wal_checkpoint".
> 
> The -wal and -shm are deleted when the last connection to the database
> closes.  If you are having -wal and -shm files left over, that implies that
> you are not closing all your database connections before you exit.

Yes !  If your application has exited and you still have a journal file, 
something is wrong.  Are you closing your connection correctly, however ASP.NET 
wants you to do it ?

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Effect of using WAL on technical support

2011-04-10 Thread Richard Hipp
On Sun, Apr 10, 2011 at 9:36 PM, Samuel Neff  wrote:

> I'm sorry, my statement was misleading.  I'm referring to immediately after
> our application is closed.
>
> We're seeing that even if the application is gracefully shut down, the -wal
> and -shm files are still there.  In order to clear them I need to open the
> database files with sqlite3.exe and issue a "pragma wal_checkpoint".
>

The -wal and -shm are deleted when the last connection to the database
closes.  If you are having -wal and -shm files left over, that implies that
you are not closing all your database connections before you exit.


>
> I'm testing on Windows 7 with ASP.NET applications.
>
> Thanks,
>
> Sam
>
>
>
> On Sun, Apr 10, 2011 at 9:10 PM, Simon Slavin 
> wrote:
>
> >
> > On 11 Apr 2011, at 2:04am, Samuel Neff wrote:
> >
> > > I'm interested in hearing anyone's experiences of using WAL journal
> mode
> > on
> > > technical support.  We often have to copy databases to attach to
> customer
> > > reports and if the someone were to copy the database file while there
> is
> > an
> > > active -wal file then we would very likely be missing the most
> up-to-date
> > > data in the copy.  I'm not sure if we can rely on support to issue a
> > pragma
> > > wal_checkpoint prior to doing the copy.
> >
> > My understanding is that no matter what journaling mode you're using, a
> > straight copy of the data file is not 'safe' while the database is open.
>  If
> > you want to backup the data, keep the database closed, or use the special
> > SQLite backup API.
> >
> > Simon.
> > ___
> > 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
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Effect of using WAL on technical support

2011-04-10 Thread Samuel Neff
I'm sorry, my statement was misleading.  I'm referring to immediately after
our application is closed.

We're seeing that even if the application is gracefully shut down, the -wal
and -shm files are still there.  In order to clear them I need to open the
database files with sqlite3.exe and issue a "pragma wal_checkpoint".

I'm testing on Windows 7 with ASP.NET applications.

Thanks,

Sam



On Sun, Apr 10, 2011 at 9:10 PM, Simon Slavin  wrote:

>
> On 11 Apr 2011, at 2:04am, Samuel Neff wrote:
>
> > I'm interested in hearing anyone's experiences of using WAL journal mode
> on
> > technical support.  We often have to copy databases to attach to customer
> > reports and if the someone were to copy the database file while there is
> an
> > active -wal file then we would very likely be missing the most up-to-date
> > data in the copy.  I'm not sure if we can rely on support to issue a
> pragma
> > wal_checkpoint prior to doing the copy.
>
> My understanding is that no matter what journaling mode you're using, a
> straight copy of the data file is not 'safe' while the database is open.  If
> you want to backup the data, keep the database closed, or use the special
> SQLite backup API.
>
> Simon.
> ___
> 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] Effect of using WAL on technical support

2011-04-10 Thread Simon Slavin

On 11 Apr 2011, at 2:04am, Samuel Neff wrote:

> I'm interested in hearing anyone's experiences of using WAL journal mode on
> technical support.  We often have to copy databases to attach to customer
> reports and if the someone were to copy the database file while there is an
> active -wal file then we would very likely be missing the most up-to-date
> data in the copy.  I'm not sure if we can rely on support to issue a pragma
> wal_checkpoint prior to doing the copy.

My understanding is that no matter what journaling mode you're using, a 
straight copy of the data file is not 'safe' while the database is open.  If 
you want to backup the data, keep the database closed, or use the special 
SQLite backup API.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Effect of using WAL on technical support

2011-04-10 Thread Samuel Neff
I'm interested in hearing anyone's experiences of using WAL journal mode on
technical support.  We often have to copy databases to attach to customer
reports and if the someone were to copy the database file while there is an
active -wal file then we would very likely be missing the most up-to-date
data in the copy.  I'm not sure if we can rely on support to issue a pragma
wal_checkpoint prior to doing the copy.

Thanks,

Sam
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users