Message-ID: From: "robert-mirzakhanian (@robert-mirzakhanian)" To: "pgjdbc/pgjdbc" Date: Tue, 04 Feb 2025 09:41:31 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3506: feat: Add access for global host status tracker In-Reply-To: References: List-Id: X-GitHub-Author-Login: robert-mirzakhanian X-GitHub-Comment-Id: 2633371329 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2025-02-04T09:41:50Z X-GitHub-Issue: 3506 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3506#issuecomment-2633371329 Content-Type: text/plain; charset=utf-8 > So `Client` is some library that checks with an external API to figure out if the host is alive ? @davecramer, yep. > Frankly speaking, I am leaning towards implementing #3409 or something like that. I am afraid if we expose `GlobalHostStatusTracker` as in the current PR, then it might complicate the implementation of 3409. WDYT? I saw this pr, but I didn't like it. In this solution, as you (@vlsi) already wrote, it duplicates the current functionality and, ideally, it should be done through a listener and sending notifications via the `reportHostStatus` method. But even in this solution, there is a risk that if the developer adds complex logic to the listener, the entire driver operation will begin to slow down. My solution only provides read access to the Map where the driver's view of hosts is stored. @vlsi, please explain how my solution affects pr [#3304](https://github.com/pgjdbc/pgjdbc/pull/3409)? If there is another way to get information from the driver about which host currently has a Connection established?