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

From Daniel Gustafsson
Subject Re: [EXTERNAL] Support load balancing in libpq
Date
Msg-id F332B65B-F167-4200-BD48-1E1363F635E1@yesql.se
Whole thread Raw
In response to Re: [EXTERNAL] Support load balancing in libpq  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Responses Re: [EXTERNAL] Support load balancing in libpq
Re: [EXTERNAL] Support load balancing in libpq
List pgsql-hackers
> 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: Tatsuo Ishii
Date:
Subject: Re: [EXTERNAL] Support load balancing in libpq
Next
From: Chris Travers
Date:
Subject: Re: Moving forward with TDE