| From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> | 
|---|---|
| To: | tamanna madaan <tamanna(dot)madaan(at)globallogic(dot)com> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: psql query gets stuck indefinitely | 
| Date: | 2011-11-29 02:22:02 | 
| Message-ID: | 4ED441CA.8050800@ringerc.id.au | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Craig Ringer | 2011-11-29 02:28:23 | Re: psql query gets stuck indefinitely | 
| Previous Message | panam | 2011-11-29 00:14:11 | Extending the volume size of the data directory volume |