I'm not sure you can have readers see something separate than writers. When SQLite promotes a read lock to a write lock under WAL then it checks if any of the data has changed and then fails the transaction if it has.
I'm not sure you can have readers see something separate than writers. When SQLite promotes a read lock to a write lock under WAL then it checks if any of the data has changed and then fails the transaction if it has.
In journal mode (which is what the VFS uses), the sequence for a write transaction is: (1) xLock(shared); (2) xRead(change-counter); (3) xLock(reserved) ...
The read of the change counter with the shared lock complicates things, because at that point we don't know if there will be a write upgrade to reserved.
However, the experimental feature makes it like this: (1) xFileControl(experimental-pragma); (2) xLock(shared); (3) xRead(change-counter); (4) xLock(reserved) ...
So you can distinguish shared locks that will be immediately upgraded.