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

From Jelte Fennema
Subject Re: [EXTERNAL] Re: Support load balancing in libpq
Date
Msg-id CAGECzQQ8SgwLyNZ=jbZ_fJ6a8oKt_JSwX5MLnkq3N8FSuxyk-A@mail.gmail.com
Whole thread Raw
In response to Re: [EXTERNAL] Re: Support load balancing in libpq  (Andrey Borodin <amborodin86@gmail.com>)
Responses Re: [EXTERNAL] Re: Support load balancing in libpq  (Jelte Fennema <postgres@jeltef.nl>)
List pgsql-hackers
> I want to note that the Fisher-Yates algorithm is implemented in a
> difficult to understand manner.
> +if (j < i) /* avoid fetching undefined data if j=i */
> This stuff does not make sense in case of shuffling arrays inplace. It
> is important only for making a new copy of an array and only in
> languages that cannot access uninitialized values. I'd suggest just
> removing this line (in both cases).

Done. Also added another patch to remove the same check from another
place in the codebase where it is unnecessary.

Attachment

pgsql-hackers by date:

Previous
From: Önder Kalacı
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Next
From: Robert Haas
Date:
Subject: Re: Non-superuser subscription owners