Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
On Wed, 9 May 2018 at 11:13 Simon Slavin wrote: > On 8 May 2018, at 1:12pm, Simon Slavin wrote: > > > You can lock the database yourself, using BEGIN EXCLUSIVE or BEGIN > IMMEDIATE depending on which you want. Then do all the backup stuff, then >

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Simon Slavin
On 8 May 2018, at 1:12pm, Simon Slavin wrote: > You can lock the database yourself, using BEGIN EXCLUSIVE or BEGIN IMMEDIATE > depending on which you want. Then do all the backup stuff, then COMMIT or > ROLLBACK without having changed anything. On 9 May 2018, at 1:50am,

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
On Tue, 8 May 2018 at 22:12 Simon Slavin wrote: > On 8 May 2018, at 10:56am, R Smith wrote: > > > Thank you for clarifying - but it is still my understanding that the DB > is not locked (if only in WAL mode), so the backup API, even with -1, > either

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Simon Slavin
On 8 May 2018, at 10:56am, R Smith wrote: > Thank you for clarifying - but it is still my understanding that the DB is > not locked (if only in WAL mode), so the backup API, even with -1, either > must ignore changes, or restart. My proposed flag is to lock rather than

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread R Smith
On 2018/05/08 11:32 AM, Rowan Worth wrote: On 8 May 2018 at 17:22, R Smith wrote: On 2018/05/08 9:37 AM, Donald Shepherd wrote: It would actually be real nice if the backup API had a parameter or flag like "sqlite3_lockduringbackup". Not quite right.

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Rowan Worth
On 8 May 2018 at 17:22, R Smith wrote: > On 2018/05/08 9:37 AM, Donald Shepherd wrote: > >> I've long assumed that when using the online backup API on a SQLite >> database, other processes will not be able to write to the source database >> for the duration of the

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
On Tue, 8 May 2018 at 19:23 R Smith wrote: > > On 2018/05/08 9:37 AM, Donald Shepherd wrote: > > I've long assumed that when using the online backup API on a SQLite > > database, other processes will not be able to write to the source > database > > for the duration of the

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread R Smith
On 2018/05/08 9:37 AM, Donald Shepherd wrote: I've long assumed that when using the online backup API on a SQLite database, other processes will not be able to write to the source database for the duration of the sqlite3_backup_step call. However under some testing I've been performing, I've

[sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
I've long assumed that when using the online backup API on a SQLite database, other processes will not be able to write to the source database for the duration of the sqlite3_backup_step call. However under some testing I've been performing, I've found that this doesn't appear to be the case.