This may be completely irrelevant, but what about storing your sqlite db on
a zfs file system (or another with similar capabilities) and creating a new
zfs snapshot whenever you need to?

I don't know how this'll fly in practice if you have a lot of snapshots or
if you need to create many very fast, for instance. I wouldn't be surprised
if something gets slow at some point. But I see that zfs apparently
supports 2^64  snapshots, and it's "copy on write", so creating a snapshot
is a relatively lightweight operation, even if your db is big. I guess it
depends on your use. BTW, zfs supports writable snapshots, so you can have
branches/forks too.

Let us know how it goes if you try! :)

Ketil
On 15 May 2016 4:52 p.m., "Mikael" <mikael.trash at gmail.com> wrote:

> Hi!
>
> Would there be any facility whereby after each transaction I do on a
> database or table, I could somehow make a snapshot so that at any future
> point in time, I could easily do a SELECT to a given version/snaphot?
>
>
> Any solution based purely on SQL would be extremely expensive I guess (e.g.
> introduce columns for snapshot index and deletedness).
>
> Implementing my own VFS would be a good way I guess, but also extremely
> complex.
>
> Thoughts?
>
> Thanks!
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to