-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Add support to set PostgreSQL application_name #386
Conversation
This PR is dependant upon doctrine/dbal#798 . PostgreSQL allows the user to set the application_name is connecting to database. It is useful for monitoring purposes. Currently one could just manually add 'application_name=foo' to DSN by appending it to dbname, like: dbname: %database_name% application_name=foo It works but having a parameter eases setting it.
@@ -47,6 +47,7 @@ | |||
<xsd:attribute name="port" type="xsd:string" /> | |||
<xsd:attribute name="user" type="xsd:string" /> | |||
<xsd:attribute name="password" type="xsd:string" /> | |||
<xsd:attribute name="application_name" type="xsd:string" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be application-name
to be consistent with the other options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that, but the GUC variable and the DSN part is called application_name
. Wouldn't it make more sense for the users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the XML format always uses dashes in places where YAML uses underscores (it is normalized by the config system). What makes sense for users is to respect the XML convention (they will get autocompletion based on the XSD in their IDE anyway)
Well, it cannot be merged here until the DBAL team merges the feature in DBAL itself |
Add support to set PostgreSQL application_name
Thanks @davividal |
This PR is dependant upon doctrine/dbal#798 .
PostgreSQL allows the user to set the application_name is connecting
to database. It is useful for monitoring purposes.
Currently one could just manually add 'application_name=foo' to DSN
by appending it to dbname, like:
It works but having a parameter eases setting it.