使用持久 postgres 连接时的 pg_close ?
当使用 pg_pconnect 连接从 php 连接到 postgres 时, pg_close : 是否
- 真的关闭连接(破坏持久效果)?
- 将连接移交给 pconnect 池?
when using pg_pconnect connections to connect from php to postgres, does pg_close :
- really close the connection (ruining the persistent effect) ?
- hand over the connection to the pconnect pool ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它与 PHP.ini 配置有关,如果标签 pgsql.allow_persistent< /a> 设置为 true 那么 pg_close 将不会关闭连接,因为它是持久的,否则如果将其设置为 false pg_close 将关闭连接。
该文档在 pg-pconnect 上说明:
It has to do with the PHP.ini configuration, if the label pgsql.allow_persistent is set to true then pg_close will not close the connection because it is persistent, otherwise if you set it to false pg_close will close the connection.
The documentation states on pg-pconnect: