Re: [EXTERNAL] Support load balancing in libpq
Tatsuo Ishii <ishii@sraoss.co.jp>
From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: daniel@yesql.se
Cc: ishii@sraoss.co.jp, postgres@jeltef.nl, stark.cfm@gmail.com,
amborodin86@gmail.com, jchampion@timescale.com, orlovmg@gmail.com,
Jelte.Fennema@microsoft.com, mbanck@gmx.net, aleksander@timescale.com,
pgsql-hackers@postgresql.org, andres@anarazel.de
Date: 2023-03-28T07:36:18Z
Lists: pgsql-hackers
>> "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 */
> }
+1.
Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
Commits
-
Fix pointer cast for seed calculation on 32-bit systems
- 2fe7a6df94e6 16.0 landed
-
Copy and store addrinfo in libpq-owned private memory
- 44d85ba5a336 16.0 landed
-
libpq: Use modern socket flags, if available.
- bfc9497ece01 16.0 cited