Hi internals,

For the past few days I've been thinking about whether to make a suggestion to 
add two-phase commit functionality to pdo.

I would like to hear everyone's opinions.


About two-phase commit
Regular transactions do not guarantee consistency across multiple DBs. For 
example, if you update DB1 and DB2 at the same time, only DB1 may be updated 
and the DB2 update may fail.

When using two-phase commit, it is as if a common transaction has been started 
for multiple DBs, and their consistency can be guaranteed.

Currently, pdo does not have such a feature as a method, but it is possible to 
use two-phase commit by executing a query. Think of it as adding such 
functionality as a method.

Although I have only written about the advantages, two-phase commit also has 
disadvantages, such as the possibility that locks may not be released forever 
under certain conditions.

Regards.

Saki
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to