Skip site navigation (1) Skip section navigation (2)

ECPG connection timeouts

From: "Edmund Bacon" <edmund(dot)bacon(at)devstudios(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: ECPG connection timeouts
Date: 2008-03-18 22:47:51
Message-ID: ABAE5512DA3D4E4597C82947769214380138B9CB@devmail.devstudios.local (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Is it possible to control how long ECPG takes when trying to connect to
a database on a remote system (e.g. connect to tcp:postgres//remote/db)

In my environment it is quite possible that the link to the remote
system may be down, so I'd prefer not to have to force the end-user to
wait 3+ minutes while ECPG CONNECT times out.

I've tried using sig_action()/alarm() and also tried using
setjmp/longjmp with alarm, but to no avail. 

Is there anything I can do within ECPG other than try a plain old
connect() to the remote system on port 5432 and not proceed with a ECPG
CONNECT if that fails?


Edmund Bacon


pgsql-interfaces by date

Next:From: Michael MeskesDate: 2008-03-23 17:34:10
Subject: Re: ECPG connection timeouts
Previous:From: Bruce MomjianDate: 2008-03-07 17:54:05
Subject: Re: v8.1: Error severity on libpq PGconn*

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group