Closed codeliner closed 6 years ago
Got a hint in the linked zend-expressive-swoole issue (see above) that the Chinese docs contain an unavailable list. An English version (translated with google translate) can be found here: https://translate.google.com/translate?hl=de&sl=auto&tl=en&u=https%3A%2F%2Fwiki.swoole.com%2Fwiki%2Fpage%2F965.html
Can we expect that PDO PostgeSQL will work in a future version of Swoole?
Well, there is a reason for that, the lib must be implemented by php_stream then we can hook it. But, not everything has good luck, some useful libs have not used it, we have the other way to hook it, but more complicated. You can see: https://wiki.swoole.com/wiki/page/983.html
thx for the explanation and hint @twose
I close the issue. Keep on the good work!
if I understand it correctly - the swoole 5.1.0 added support for pdo postgres coroutines: https://pecl.php.net/package-info.php?package=swoole&version=5.1.0
Please answer these questions before submitting your issue. Thanks!
I tried the Coroutine feature available since swoole 4.1 for PDO. I run a test against MySql server and it works like expected. I run the same test against PostgreSQL server and PDO query is blocking.
You can find the test here: https://github.com/proophsoftware/swoole-mongo-test#set-up
I have a Swoole Http Server running with only one worker. One request uses PDO to perform a slow query (simulated with a sleep select query) that takes 10 seconds. My expectation is that even if the query takes 10 seconds other requests are served just fine due to Coroutines enabled.
MySql works like a charm but PostgreSQL query is blocking. Hence, parallel requests are not served until query resolves.
php --ri swoole
)?The Swoole server runs in a docker container: prooph/php:7.2-cli