-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'persistent' connection parameter neglected in postgre driver #349
Comments
One more comment: as the default behavior of pg_connect(...) is to establish a persistent connection, it might be a consideration to make postgre connections via dibi persistent per default too. In other words, only if the 'persistent' connection parameter is explicitly set to false, the connection is non-persistent (connection type If you prefer this breaking change to the bug fix above, I'd create a suitable pull request. |
closed by #348 |
I am confused about pg_connect vs pg_pconnect vs PGSQL_CONNECT_FORCE_NEW. It seems like something different https://github.com/php/php-src/blob/5d6564101192f8560d175cdec96c319d3c878b82/ext/pgsql/pgsql.c#L1358-L1442 |
Sorry, I've linked the wrong doc (I mentioned 'pg_connect' but linked docs of 'pg_pconnect'). In any case, I would stick to 'pg_connect(...)', because the latest comments about 'pg_pconnect(...)' at php.net mention that it is broken:
Anyway, what I wanted to point out in my original post above was So I was wondering if it wouldn't make more sense, to call In a quick'n'dirty test this seems to speedup the re-connection significantly. |
I don't know, I've never used PostgreSQL. But I would not like to make a BC break in the patch version, so rather in 4.2. |
I wouldn't either. ;) Thanks for your good work! |
Ok, thanks. |
Version: 4.x
Bug Description
The config parameter 'persistent' has no effect on how the Postgres connection is made.
Possible Solution
#348
The text was updated successfully, but these errors were encountered: