I don't think is this case.
We test this by using the IP address, not the hostname.
What we can see is the extremely low speed of connection in 2 of 10 cases, when using a psql at command line with a simple "select 1 from...." inside a loop of a shell script FROM THE PG SERVER!!!
If we do the same, but using a pipe connection (no IP address), there is no delay.