On 16 Aug 2016, at 12:21pm, Dominique Devienne <ddevie...@gmail.com> wrote:

> What are the guarantees, if any, SQLite makes about preserving what's in
> these reserved bytes,
> for example during vacuuming, or any operation that moves pages around?
> 
> And if these reserved bytes are not preserved (logical in a way), who is
> supposed to "rewrite" them?
> A custom VFS? I'm thinking page checksums for examples. The page checksum
> could likely change during
> a vaccum, so even if SQLite copied the bytes as-is, they wouldn't be
> up-to-date anymore.

VACUUM destroys tables (and indexes) and makes new ones, so it frees pages and 
allocates new ones.  The content of the 'unused' bytes in the newly-allocated 
pages would not have anything to do with the content of the pages which used to 
exist.  I don't know if those bytes would dependably contain zero or just 
gibberish.

If you're to use some of these bytes for your own values you will presumably be 
modifying the pager module of SQLite, as mentioned in the "Page Cache" section 
of

<https://www.sqlite.org/arch.html>

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to