Hi, I've opened a PR adding a new attribute to PDO\Sqlite:
https://github.com/php/php-src/pull/19317 <https://github.com/php/php-
src/pull/19317?notification_referrer_id=NT_kwDOAfgLhrQxNzkxMjcwMjYzOTozMzAzMzA5NA#issuecomment-
3176177745>

The change is explained in depth in the PR, but in short, it makes it
possible to use immediate/exclusive transaction modes, rather than the
default deferred mode, when using $pdo->beginTransaction(). Deferred
mode has this particular behavior where if your transaction first reads
before writing, it will only wait for other transactions to finish while
acquiring the initial shared lock. Then when it tries to upgrade to a
write lock it just immediately aborts with SQLITE_BUSY, regardless of
your busy_timeout setting.

This is a real pain point with using SQLite in production. I've
addressed it by adding a new attribute that changes how the PDO driver
begins the transaction.

Is my understanding correct that this doesn't need an RFC? And if that's
the case, is this PR not subject to the PHP 8.5 feature freeze happening
this week?

The changes are pretty basic so I'd appreciate any reviews that could
move this forward. Would love for this to land in PHP 8.5.

Reply via email to