Re: [EXTERNAL] Support load balancing in libpq - Mailing list pgsql-hackers

From Jelte Fennema
Subject Re: [EXTERNAL] Support load balancing in libpq
Date
Msg-id CAGECzQTR1sg4WcqWGbhaJvNH3qgP6EGUGk4YdXoMN9nV7iFebQ@mail.gmail.com
Whole thread Raw
In response to Re: [EXTERNAL] Support load balancing in libpq  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: [EXTERNAL] Support load balancing in libpq
Re: [EXTERNAL] Support load balancing in libpq
List 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@yesql.se> wrote:
>
> > On 28 Mar 2023, at 09:16, Tatsuo Ishii <ishii@sraoss.co.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
>



pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: PGdoc: add missing ID attribute to create_subscription.sgml
Next
From: Tatsuo Ishii
Date:
Subject: Re: [EXTERNAL] Support load balancing in libpq