Re: psql query gets stuck indefinitely

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: psql query gets stuck indefinitely
Дата
Msg-id 4ED441CA.8050800@ringerc.id.au
обсуждение исходный текст
Ответ на psql query gets stuck indefinitely  (tamanna madaan <tamanna.madaan@globallogic.com>)
Список pgsql-general
 On 11/28/2011 05:30 PM, tamanna madaan wrote:
Hi All
 
I have postgres installed in cluster setup. My system has a script  which executes the below query on remote system in cluster.
 
psql -t -q -Uslon -h<hostip> -d<dbname> -c"select 1;"
 
But somehow this query got stuck. It didnt return even after the remote system( on which this query was supposed to execute) is rebooted . What could be the reason ??


The issue will most likely be related to the network or to the client-side host. Perhaps the client machine changed IP addresses (maybe as part of a switch from WiFi to wired or similar) ?

Check the man page for psql in 9.1; I think client-side keepalive support got committed for 9.1 . If it didn't, you can always set it globally for all TCP/IP connections on your system. See eg http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html .

--
Craig Ringer

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

Предыдущее
От: panam
Дата:
Сообщение: Extending the volume size of the data directory volume
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: psql query gets stuck indefinitely