Re: [GENERAL] Postgres intermittent connection errors: psql.bin: could not connect to server: Cannot assign requested address

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Postgres intermittent connection errors: psql.bin: could not connect to server: Cannot assign requested address
Дата
Msg-id 30038.1494916166@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [GENERAL] Postgres intermittent connection errors: psql.bin: could not connectto server: Cannot assign requested address  (Vamsi Patchipulusu <vpatchipulusu@equinix.com>)
Список pgsql-general
Vamsi Patchipulusu <vpatchipulusu@equinix.com> writes:
>           Error: psql.bin: could not connect to server: Cannot assign requested address
>         Is the server running on host "abchost.corp.xyz.com" (xxx.xxx.xxx.xxx) and accepting
>         TCP/IP connections on port 5432?

Googling suggests that this could occur if you're recycling client-side
connections so fast that the old port number assignments haven't timed out
yet.  That's not a Postgres bug, it's inherent in the TCP protocol specs.

> The  shell script does the following:
> a)      Connects to postgres database server using psql.
> b)      Issues a single select statement on table with 200 rows .
> c)       Writes the results to a text file.

There is a large body of evidence to the effect that issuing only one
query per connection attempt is a performance-killer.  Don't do that, at
least not more often than you have to.  This particular symptom is a new
one on me, but there are lots of other reasons not to do it.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] Postgres intermittent connection errors: psql.bin:could not connect to server: Cannot assign requested address
Следующее
От: Devrim Gündüz
Дата:
Сообщение: Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2on Centos 6.9