Re: [PATCH] pgbench: add multiconnect option

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Jelte Fennema <postgres(at)jeltef(dot)nl>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, David Christensen <david(dot)christensen(at)crunchydata(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pgbench: add multiconnect option
Date: 2023-01-10 15:59:34
Message-ID: 266cbf2f-8958-37e3-5ab2-d8671911fb36@mines-paristech.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)PR3PR83MB0476(dot)EURPRD83(dot)prod(dot)outlook(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-01-10 16:06:52 Re: allowing for control over SET ROLE
Previous Message PG Doc comments form 2023-01-10 15:53:10 The documentation for storage type 'plain' actually allows single byte header