Cancelling sqlite3_wal_checkpoint

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cancelling sqlite3_wal_checkpoint

Albert Banaszkiewicz
Hi all,


Is it possible to cancel check-pointing operation in any way ?

I could find how to interrupt queries (?sqlite3_interrupt) but I assume it won't work for check-pointing (not really a query).


However, like long-lasting queries, check-pointing can take a while, thus I am wondering if there is any way to reliably cancel it.


Thank you in advance,

Albert?
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Cancelling sqlite3_wal_checkpoint

Richard Hipp-3
On 5/3/16, Albert Banaszkiewicz <[hidden email]> wrote:
> Hi all,
>
>
> Is it possible to cancel check-pointing operation in any way ?
>

You can kill the thread or process that is running the checkpoint.
Other than that, there is not currently any way to interrupt a
checkpoint in progress.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

ODP: Cancelling sqlite3_wal_checkpoint

Albert Banaszkiewicz
I see.
How safe it will be with respect to data integrity ? Are there any chances data can get lost ?
Will it affect other read connections in any way ?

If the process is terminated like this, what will happen when sqlite3_wal_checkpoint is called again ? Is the process going to be resumed from the point where it was interrupted (more or less) or from the beginning ?

Cheers,
Albert

________________________________________
Od: [hidden email] <[hidden email]> w imieniu użytkownika Richard Hipp <[hidden email]>
Wysłane: 3 maja 2016 15:20
Do: SQLite mailing list
Temat: Re: [sqlite] Cancelling sqlite3_wal_checkpoint

On 5/3/16, Albert Banaszkiewicz <[hidden email]> wrote:
> Hi all,
>
>
> Is it possible to cancel check-pointing operation in any way ?
>

You can kill the thread or process that is running the checkpoint.
Other than that, there is not currently any way to interrupt a
checkpoint in progress.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: ODP: Cancelling sqlite3_wal_checkpoint

Richard Hipp-3
On 5/3/16, Albert Banaszkiewicz <[hidden email]> wrote:
> I see.
> How safe it will be with respect to data integrity ? Are there any chances
> data can get lost ?

SQLite is designed to handle this without data loss.  And we actually
run a lot of tests for that as well.

> Will it affect other read connections in any way ?

No.

>
> If the process is terminated like this, what will happen when
> sqlite3_wal_checkpoint is called again ? Is the process going to be resumed
> from the point where it was interrupted (more or less) or from the beginning
> ?

It starts over again from the beginning, unfortunately.  No
intermediate state was saved that would allow it to resume where it
left off.

That would also be the case where checkpoint interruptible using
sqlite3_interrupt().

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

ODP: ODP: Cancelling sqlite3_wal_checkpoint

Albert Banaszkiewicz
Thank you!

________________________________________
Od: [hidden email] <[hidden email]> w imieniu użytkownika Richard Hipp <[hidden email]>
Wysłane: 3 maja 2016 15:41
Do: SQLite mailing list
Temat: Re: [sqlite] ODP: Cancelling sqlite3_wal_checkpoint

On 5/3/16, Albert Banaszkiewicz <[hidden email]> wrote:
> I see.
> How safe it will be with respect to data integrity ? Are there any chances
> data can get lost ?

SQLite is designed to handle this without data loss.  And we actually
run a lot of tests for that as well.

> Will it affect other read connections in any way ?

No.

>
> If the process is terminated like this, what will happen when
> sqlite3_wal_checkpoint is called again ? Is the process going to be resumed
> from the point where it was interrupted (more or less) or from the beginning
> ?

It starts over again from the beginning, unfortunately.  No
intermediate state was saved that would allow it to resume where it
left off.

That would also be the case where checkpoint interruptible using
sqlite3_interrupt().

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users