pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: davecramer (@davecramer) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #3506: feat: Add access for global host status tracker
Date: Tue, 04 Feb 2025 12:51:52 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> > 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?

Yes, generally through some kind of topology function in the database. For instance Aurora has [`aurora_replica_status()`](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora_replica_status.html) I'm not a huge fan of the driver reaching out to another port, or API

I would entertain the pluggable idea in #3409 

view thread (26+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #3506: feat: Add access for global host status tracker
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox