Re: Should PQconsumeInput/PQisBusy be expensive to use?

Поиск
Список
Период
Сортировка
От A.M.
Тема Re: Should PQconsumeInput/PQisBusy be expensive to use?
Дата
Msg-id 3A50C6AA-ECA5-4659-B17C-017E588737E3@themactionfaction.com
обсуждение исходный текст
Ответ на Re: Should PQconsumeInput/PQisBusy be expensive to use?  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-general
On Oct 28, 2010, at 12:04 PM, Daniel Verite wrote:

>     A.M. wrote:
>
>> In PostgreSQL, query canceling is implemented by opening a
>> second connection and passing specific data which is received
>> from the first connection
>
> With libpq's PQCancel(), a second connection is not necessary.

To clarify, PQcancel() opens a new socket to the backend and sends the cancel message. (The server's socket address is
passedas part of the cancel structure to PQcancel.) 


http://git.postgresql.org/gitweb?p=postgresql.git;a=blob;f=src/interfaces/libpq/fe-connect.c;h=8f318a1a8cc5bf2d49b2605dd76581609cf9be32;hb=HEAD#l2964

The point is that a query can be cancelled from anywhere really and cancellation will not use the original connection
socket.

Cheers,
M

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

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: share lock when only one user connected?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: share lock when only one user connected?