Re: Problem Using PQcancel in a Synchronous Query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem Using PQcancel in a Synchronous Query
Дата
Msg-id 15968.1282608385@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem Using PQcancel in a Synchronous Query  ("Eric Simon" <esimon@theiqgroup.com>)
Ответы Re: Problem Using PQcancel in a Synchronous Query  ("Eric Simon" <esimon@theiqgroup.com>)
Список pgsql-hackers
"Eric Simon" <esimon@theiqgroup.com> writes:
> Now that I've established some context, here's where I'm at: I've written
> $sth->cancel() for DBD::Pg using PQcancel(), and it works (it returns the
> status 57014: QUERY CANCELED).  The problem is that the $sth->execute call
> (which resides between the two alarm() calls above) doesn't continue on, but
> rather stays frozen, waiting for data.  Does PQcancel not communicate back
> to the execute statement so that it unblocks?

Um ... PQcancel returns no such thing, only true or false.  I'm guessing
you've coded your signal handler in such a way that it eats the query
result message intended for the mainline execute code.  You should not
be calling anything except PQcancel itself in the signal handler.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WIP: extensible enums
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP: extensible enums