- Notifications
You must be signed in to change notification settings - Fork904
Add back application name setting#3509
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
this#3491 doesn't fix it ? |
pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
OK, I think we need to add it back. I think the runInitialQueries needs to be tightened up and we need to document this better. Thanks! |
48630a6
tofe23843
Comparejoejensen commentedFeb 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I believe the latest changes will run the initial queries only when necessary. I was able to add a unit test that fails for the original code, when assumeMinServerVersion was set to >= 9.0 resulting in the application name being blank. However, I don't see a straight-forward way to verify that it's being set in the startup parameters rather than via the initial queries (in the test harness at least). If you have any ideas, I would appreciate it. I also added a note about this use-case into the documentation, not sure if it belongs anywhere else. |
Uh oh!
There was an error while loading.Please reload this page.
ba257ca
to9abd197
Compare9abd197
to9ef77ad
Compareif (PGProperty.GROUP_STARTUP_PARAMETERS.getBoolean(info) &&dbVersion >=ServerVersion.v9_0.getVersionNum()) { | ||
SetupQueryRunner.run(queryExecutor,"BEGIN",false); | ||
} | ||
// Only need to send the application name if it's defined and wasn't already sent as a startup parameter |
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 wouldn't mind seeing some more explanation as to how we used the following tests to come to that conclusion.
71170a4
intopgjdbc:masterUh oh!
There was an error while loading.Please reload this page.
Fixes#3508, by adding back the application_name startup parameters during the initial connection.