Cancelling idle in transaction state

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Cancelling idle in transaction state
Дата
Msg-id 1229527886.4793.54.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответы Re: Cancelling idle in transaction state  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Currently SIGINT is ignored during <IDLE> in transaction, but we have
recently agreed to allow this to cancel the transaction. We said we
would do this in all cases, so this is a separate feature/patch (though
Hot Standby requires it).

A simple change allows the transaction to be cancelled, but there are
some loose ends that I wish to discuss.

If we are running a statement and a cancel is received, then we return
the ERROR to the client, who is expecting it. If we cancel a transaction
while the connection is idle, we have no way of signalling to the client
program this has occurred. So the client finds out about this much
later, not in fact until the next message is sent.

Is there a mechanism for communicating the state back to the client?
Will this be handled correctly with existing code? psql appears to be
confused by a cancelled backend.

I'm not familiar with these aspects of the code, so some clear
suggestions are needed to allow me to work this out. I'm worried that
this will delay things further otherwise.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Latest version of Hot Standby patch
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Invalid pages in WAL