PQexec and timeouts

Поиск
Список
Период
Сортировка
От Medi Montaseri
Тема PQexec and timeouts
Дата
Msg-id 3DF7E354.9050303@intransa.com
обсуждение исходный текст
Ответы Re: PQexec and timeouts  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: jco@cornelius-olsen.dk
Дата:
Сообщение: Re: Batch Inserts
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PQexec and timeouts