> Rowan Worth Thu, 26 Jul 2018 22:02:50 -0700
>
> On 26 July 2018 at 05:56, Rune Torgersen <ru...@innovsys.com> wrote:
>
> > The databases have been opened with two connections (one for reads, one
> > for writes), and use the following options:
> >     sqlite3_busy_timeout(mDbConn, 500);
> >     sqlite3_exec(mDbConn, "PRAGMA locking_mode = EXCLUSIVE;", 0, 0, 0);
> >
>
> Surely this effectively reduces your number of connections to one?

No, both connections are from within the same application, and have seemed to 
work just fine for about 10 years now...

>
> PRAGMA quick_check is faster, but not as exhaustive as integrity_check.
>
> There's more efficient ways to copy a DB than the backup api, but they
> involve either downtime as Simon said, or some risk in correctly managing
> locks.

The application has uptime sometimes measured in years, so closing it down to 
backups are not feasible.


> It's not clear whether you have another process calling sqlite3_backup_* or
> that is done by the application itself. The latter can be more efficient as
> sqlite will not have to restart the backup if the application updates the
> DB (any writes to a DB are automatically propagated to in-progress backups
> within the same process).

backup is done from a separate thread within same process. Same with the 
integrity check

Rune Torgersen
Innovative Systems LLC
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to