PQexec and timeouts

From: Medi Montaseri <medi(dot)montaseri(at)intransa(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: PQexec and timeouts
Date: 2002-12-12 01:16:04
Message-ID: 3DF7E354.9050303@intransa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there any configuration parameter (run time or compile time) that would
allow me to timeout from a query.....

ie, say I make a query (select or delete or whatever) against the
backend which
is using some disk off of a networked storage (NAS, SAN, etc)...

I need to timeout if the resource (disk or the network) is wedged...

If not, then what if I implement it using
PQsendQuery()
select on the connection socket with some timeout
if you haven't gotton your answer, abort the query...

What is the best way to abort the query...I know of

PQfinish() # too expensive, it closes the TCP connection
PQreset() # not sure but almost as expensive as PQfinish()
PQrequestCancel() # this sounds good...

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-12-12 01:44:30 Re: PQexec and timeouts
Previous Message jco 2002-12-12 00:55:14 Re: Batch Inserts