pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edmund Bacon <edmund.bacon@devstudios.com>
To: pgsql-interfaces@postgresql.org
Subject: ECPG connection timeouts
Date: Tue, 18 Mar 2008 16:47:51 -0600
Message-ID: <ABAE5512DA3D4E4597C82947769214380138B9CB@devmail.devstudios.local> (raw)

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?

Thanks,

Edmund Bacon



view thread (3+ messages)  latest in thread

Message-ID: <ABAE5512DA3D4E4597C82947769214380138B9CB@devmail.devstudios.local>
Permalink:  ../ABAE5512DA3D4E4597C82947769214380138B9CB@devmail.devstudios.local/
Also on:    postgresql.org/message-id/ABAE5512DA3D4E4597C82947769214380138B9CB@devmail.devstudios.local

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: edmund.bacon@devstudios.com
  Subject: Re: ECPG connection timeouts
  In-Reply-To: <ABAE5512DA3D4E4597C82947769214380138B9CB@devmail.devstudios.local>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox