Re: Psql or test application hangs when interface is down for the DB server

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "K\, Niranjan \(NSN - IN\/Bangalore\)" <niranjan(dot)k(at)nsn(dot)com>
Cc: "ext Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Psql or test application hangs when interface is down for the DB server
Date: 2008-07-16 09:41:52
Message-ID: 87prpemahr.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"K, Niranjan (NSN - IN/Bangalore)" <niranjan(dot)k(at)nsn(dot)com> writes:

> Is there any other workaround or alternative so that the situation about
> the interface is down is known and based on that the 'PQexec' does not
> get blocked for ~15 minutes.

Absent threads I think you have to use alarm() and a SIGALRM signal handler.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-07-16 14:33:07 Re: Psql or test application hangs when interface is down for the DB server
Previous Message Dave Page 2008-07-16 08:03:43 Re: BUG #4303: insufficient privileges