Re: [PATCH] pgbench: add multiconnect option - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [PATCH] pgbench: add multiconnect option
Date
Msg-id 266cbf2f-8958-37e3-5ab2-d8671911fb36@mines-paristech.fr
Whole thread Raw
In response to Re: [PATCH] pgbench: add multiconnect option  (Jelte Fennema <postgres@jeltef.nl>)
List pgsql-hackers
Hello Jelte,

> 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/PR3PR83MB04768E2FF04818EEB2179949F7A69@PR3PR83MB0476.EURPRD83.prod.outlook.com

Thanks for the pointer.

The end purpose of the patch is to allow pgbench to follow a failover at 
some point, at the client level, AFAICR.

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

Yep. I'm not sure the end purpose is the same, but possibly the pgbench 
patch could take advantage of libpq extension.

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

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Use windows VMs instead of windows containers on the CI
Next
From: Robert Haas
Date:
Subject: Re: allowing for control over SET ROLE