Re: [sqlite] Undo sqlite3_snapshot_open?
Woohoo, thanks Dan! I'm going to try this very soon :-) Gwendal On Thu, Sep 19, 2019 at 1:18 PM Dan Kennedy wrote: > > On 19/9/62 18:13, Gwendal Roué wrote: > > Hello, > > > > I am looking at the snapshot experimental APIs, and it looks like once a > > connection has been sent to an "historical snapshot" with > > sqlite3_snapshot_open (https://www.sqlite.org/c3ref/snapshot_open.html), > > the connection can never be restored back to regular operations. > > > > Is it correct? > > I don't think so. > > If you end the transaction opened with sqlite3_snapshot_open() (by > executing a "COMMIT" or "ROLLBACK" and calling sqlite3_reset() or > sqlite3_finalize() on all active SELECT statements) then open a new > transaction, the new transaction accesses the latest database snapshot - > just as if you had never used sqlite3_snapshot_open() with the > connection at all. > > Dan. > > > > > > > Thanks is advance, > > Gwendal Roué > > ___ > > sqlite-users mailing list > > sqlite-users@mailinglists.sqlite.org > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Undo sqlite3_snapshot_open?
On Thu, Sep 19, 2019 at 1:13 PM Gwendal Roué wrote: > I am looking at the snapshot experimental APIs > How long do experimental APIs remain experimental? Snapshot is over 3.75 years old now. Will it ever graduate to a fully supported API? As far as I understood the doc, a snapshot remains valid only as long as the WAL file is not checkpointed. Which imply checkpoint is allowed to invalidate any snapshots, while I can see where the reverse would be preferred, i.e. active snapshots prevent the full checkpointing of the WAL file. Is there any way to know about snapshots, so the connection in charge of checkpointing does not clobber them? Thanks, --DD ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Undo sqlite3_snapshot_open?
On 19/9/62 18:13, Gwendal Roué wrote: Hello, I am looking at the snapshot experimental APIs, and it looks like once a connection has been sent to an "historical snapshot" with sqlite3_snapshot_open (https://www.sqlite.org/c3ref/snapshot_open.html), the connection can never be restored back to regular operations. Is it correct? I don't think so. If you end the transaction opened with sqlite3_snapshot_open() (by executing a "COMMIT" or "ROLLBACK" and calling sqlite3_reset() or sqlite3_finalize() on all active SELECT statements) then open a new transaction, the new transaction accesses the latest database snapshot - just as if you had never used sqlite3_snapshot_open() with the connection at all. Dan. Thanks is advance, Gwendal Roué ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Undo sqlite3_snapshot_open?
Hello, I am looking at the snapshot experimental APIs, and it looks like once a connection has been sent to an "historical snapshot" with sqlite3_snapshot_open (https://www.sqlite.org/c3ref/snapshot_open.html), the connection can never be restored back to regular operations. Is it correct? Thanks is advance, Gwendal Roué ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users