Message-ID: From: "joejensen (@joejensen)" To: "pgjdbc/pgjdbc" Date: Tue, 18 Feb 2025 22:27:10 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3509: Add back application name setting In-Reply-To: References: List-Id: X-GitHub-Author-Login: joejensen X-GitHub-Comment-Id: 2667064153 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2025-02-18T22:28:08Z X-GitHub-Issue: 3509 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3509#issuecomment-2667064153 Content-Type: text/plain; charset=utf-8 I believe the latest changes will run the initial queries only when necessary. On PG 12 and later no initial queries are required assuming the assumMinServerVersion is set correctly. On PG 9-11.x only the extra digits query is required if assumeMinServerVersion is set correctly. 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.