Re: Cancelling Requests Frontend/Backend Protocol TCP/IP

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Cancelling Requests Frontend/Backend Protocol TCP/IP
Дата
Msg-id 4AEEA678.3090505@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: Cancelling Requests Frontend/Backend Protocol TCP/IP  (Raimon Fernandez <coder@montx.com>)
Ответы Re: Cancelling Requests Frontend/Backend Protocol TCP/IP
Re: Cancelling Requests Frontend/Backend Protocol TCP/IP
Список pgsql-general
On 2/11/2009 5:15 PM, Raimon Fernandez wrote:

> For what I've read in the manuals, this operation is only valid before
> PostgreSQL has finished processing the SELECT statement ?
>
> If for example I send  a SELECT * from myTable, it has 20000 rows, and
> postgre starts sending the rows, how I can cancel this operation ?

Assuming you're asking "is there any way to cancel a running query using
the postgresql tcp/ip protocol" then, as you've noted, you can cancel
the request until you start getting data.

After that, you can still cancel the query by establishing another
connection to the server and calling pg_cancel_backend( ) at the SQL
level. This does, unfortunately, involve the overhead of setting up and
tearing down a connection and the associated backend.

--
Craig Ringer

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

Предыдущее
От: "Bernard Grosperrin"
Дата:
Сообщение: Re: Error on compile for Windows
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: DataRow Null values Frontend/Backend Protocol TCP/IP