This patch seems to have quite some use case overlap with my patch which adds load balancing to libpq itself: https://www.postgresql.org/message-id/flat/pr3pr83mb04768e2ff04818eeb2179949f7...@pr3pr83mb0476.eurprd83.prod.outlook.com
My patch is only able to add "random" load balancing though, not "round-robin". So this patch still definitely seems useful, even when mine gets merged. I'm not sure that the support for the "working" connection is necessary from a feature perspective though (usability/discoverability is another question). It's already possible to achieve the same behaviour by simply providing multiple host names in the connection string. You can even tell libpq to connect to a primary or secondary by using the target_session_attrs option. On Fri, 6 Jan 2023 at 11:33, Fabien COELHO <coe...@cri.ensmp.fr> wrote: > > Hello Ian, > > > cfbot reports the patch no longer applies. As CommitFest 2022-11 is > > currently underway, this would be an excellent time to update the patch. > > Attached a v5 which is just a rebase. > > -- > Fabien.