Re: [EXTERNAL] Support load balancing in libpq

From: Jelte Fennema <postgres(at)jeltef(dot)nl>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, "Gregory Stark (as CFM)" <stark(dot)cfm(at)gmail(dot)com>, Andrey Borodin <amborodin86(at)gmail(dot)com>, Jacob Champion <jchampion(at)timescale(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, Jelte Fennema <Jelte(dot)Fennema(at)microsoft(dot)com>, mbanck(at)gmx(dot)net, aleksander(at)timescale(dot)com, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, andres(at)anarazel(dot)de
Subject: Re: [EXTERNAL] Support load balancing in libpq
Date: 2023-03-28 07:33:27
Message-ID: CAGECzQTR1sg4WcqWGbhaJvNH3qgP6EGUGk4YdXoMN9nV7iFebQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I think it's fine to remove it. It originated from postmaster.c, where
I copied the original implementation of libpq_prng_init from.

On Tue, 28 Mar 2023 at 09:22, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 28 Mar 2023, at 09:16, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:
>
> > "unlikely" macro is used in libpq_prng_init() in the patch. I wonder
> > if the place is really 'hot' to use "unlikely" macro.
>
> I don't think it is, I was thinking to rewrite as the below sketch:
>
> {
> if (pg_prng_strong_seed(&conn->prng_state)))
> return;
>
> /* fallback seeding */
> }
>
> --
> Daniel Gustafsson
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2023-03-28 07:36:18 Re: [EXTERNAL] Support load balancing in libpq
Previous Message Hayato Kuroda (Fujitsu) 2023-03-28 07:30:15 RE: PGdoc: add missing ID attribute to create_subscription.sgml