I have my own VFS layer, and recently started trying to get the default 
page size to actually match the real device erase block size depending 
on the actual device the database is running on.

What I've found is that the xSectorSize method in the VFS is *not* 
called unless I unset the device characteristic of 
SQLITE_IOCAP_POWERSAFE_OVERWRITE (which is ironic since the device is 
power safe overwrite, but only if its the erase block size).
This ends up meaning that the page_size always returns 
SQLITE_DEFAULT_PAGE_SIZE regardless of sector size.

Obviously I could get around this by running pragma page_size prior to 
making the database in the first place, but that seems unnecessary 
considering that I already have a VFS layer in place.

Reply via email to