Pg_close when using persistent postgres connections?

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

  • really close the connection (ruining the permanent effect)?
  • transfer connection to pconnect pool?
+4
source share
1 answer

This is due to the configuration of PHP.ini, if the pgsql.allow_persistent label 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 says pg-pconnect :

pg_close() will not close persistent links generated by pg_pconnect() 
+5
source

Source: https://habr.com/ru/post/1382258/


All Articles