문제

when using pg_pconnect connections to connect from php to postgres, does pg_close :

  1. really close the connection (ruining the persistent effect) ?
  2. hand over the connection to the pconnect pool ?
도움이 되었습니까?

해결책

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:

pg_close() will not close persistent links generated by pg_pconnect()
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top