Persistent connection mechanism is not same as Connection pooling. We do not need implementation of connection pooling in CCI.
At first, I thought pconnect need connection pooling mechanism.
When I heard connection pooling will supported since CUBRID 8.4.1, I want to add pconnect features to PHP interface.
But, 张慧 point out that Persistent connection is different from Connection pooling.
Persistent connection vs. Connection pooling
| Persistent connection |
Connection pooling |
| only one connection in Persistent connection mode |
Connection pooling enables more connections |
| second call of cubrid_pconnect() will reuse connection that opened by first call of cubrid_pconnect(), even the connection not closed by cubrid_close() |
second call of cubrid_connect_pool() (assumed name) will get new connection from the pool, it different from connection got by first call of cubrid_connect_pool() |
So, cubrid_pconnect() can implemented in lower version such as 8.4.0
If there is a demand in lower version of PHP interface, we can add pconnect features.
Couple months ago we have discussed this feature. Check our conversation at SF.net forum. The idea is CUBRID Broker supports Persistent Connection, which we cannot change through API. So, to support cubrid_pconnect, CCI has to be changed, which I am not sure if possible. So, have a look and keep us posted. Thanks.