Re: [sqlite] Committing to a savepoint

2011-01-14 Thread Pavel Ivanov
Max, I understand your point of view. But you assume that any insert ends up with call to xWrite in the VFS (so that VFS could track the changes). But it's not that way in SQLite. xWrite is called only during commit and it's provided with full database pages, not individual changes. Pavel On

Re: [sqlite] Committing to a savepoint

2011-01-14 Thread Max Vlasov
On Fri, Jan 14, 2011 at 8:55 PM, Pavel Ivanov wrote: > > There are some challenges, for example to allow arbitrary undo > > operations we should also log transaction boundaries since undoing to > some > > points in between not only makes little sense, but also dangerous. But

Re: [sqlite] Committing to a savepoint

2011-01-14 Thread Pavel Ivanov
> There are some challenges, for example to allow arbitrary undo > operations we should also log transaction boundaries since undoing to some > points in between not only makes little sense, but also dangerous. But I > think if implemented with those challenges solved, such implementation would >

Re: [sqlite] Committing to a savepoint

2011-01-14 Thread Max Vlasov
On Fri, Jan 14, 2011 at 2:16 AM, Charles Samuels wrote: > > Here's more or less what I need: > > A * sqlite gets some inserts > B * we're at a checkpoint, so everything after this point shouldn't get > committed now. So "savepoint SP" > C * insert some more into sqlite > D *

Re: [sqlite] Committing to a savepoint

2011-01-13 Thread Pavel Ivanov
> Is there a way to do this today? How hard would it be to add "commit to > savepoint" if not? It's impossible to do the thing you want in SQLite. And it won't be feasible to add that. What you really want is for database engine to allow to have two parallel writing transactions and for it to not

Re: [sqlite] Committing to a savepoint

2011-01-13 Thread Charles Samuels
On Thursday, January 13, 2011 3:23:55 pm Simon Slavin wrote: > Look at savepoints: > > http://www.sqlite.org/lang_savepoint.html Yes, I have been, and I use them quite a bit. However, they don't appear to meet my needs, which is why I asked my question. Charles

Re: [sqlite] Committing to a savepoint

2011-01-13 Thread Simon Slavin
On 13 Jan 2011, at 11:16pm, Charles Samuels wrote: > In short, I want a "commit to savepoint savepoint-name" which commits up > until > a savepoint begins, but not anything after. Look at savepoints: http://www.sqlite.org/lang_savepoint.html Simon.

[sqlite] Committing to a savepoint

2011-01-13 Thread Charles Samuels
Hi, I have a program that uses sqlite to do bookkeeping for another set of data. I do a commit on sqlite once I'm certain the other set of data is done. While I'm waiting for the other set of data to process, I might make other changes to my Sqlite database. However, I don't want to commit