Skip to content
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

Reuse postgres connection by default #353

Closed
groupnet opened this issue Feb 11, 2020 · 2 comments
Closed

Reuse postgres connection by default #353

groupnet opened this issue Feb 11, 2020 · 2 comments

Comments

@groupnet
Copy link
Contributor

groupnet commented Feb 11, 2020

This is a follow up to bugfix #349 (breaking change).

Intention
To be inline with the default behavior of pg-connect(...), make the connection without PGSQL_CONNECT_FORCE_NEW by default (see PHP manual: pg-connect). This might increase performance on frequent re-connections.

Straight forward approach
master...groupnet:PostgreDriver_persistent_bydefault

Question
To avoid confusion with the persistent postgres connection via the php function 'pg_pconnect(...)' (see PHP manual: pg-pconnect), I wanted to ask if you prefer to add new dibi parameter, eg. forcenew instead of using the existing parameter persistent as suggested in the approach above.

If no: I will make a pull request with the above approach.
If yes:

  • what should be the name of the new parameter? forcenew?
  • do you want me to implement another if-clause to also cover the persistent connection via pg_pconnect(...)?
@dg
Copy link
Owner

dg commented Feb 13, 2020

That would be good if someone using PostgreSQL can comment…

Because I don't care. I just don't want to listen to complaints that something has broken :-)

@groupnet
Copy link
Contributor Author

The pull request #370 is my new approach to this issue:

  • non-breaking change
  • still gives the user to switch to PHP default: config['connect_type'] = 0;

@dg dg closed this as completed Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants