Re: [HACKERS] Optional message to user when terminating/cancelling backend

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Optional message to user when terminating/cancelling backend
Дата
Msg-id CAB7nPqRS9zY4QNhtq7=Xo_boYVKBqx57db=sKgUrEh79z-6UVA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Optional message to user when terminating/cancelling backend  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: [HACKERS] Optional message to user when terminating/cancellingbackend  (Yugo Nagata <nagata@sraoss.co.jp>)
Список pgsql-hackers
On Wed, Jun 21, 2017 at 11:42 PM, Daniel Gustafsson <daniel@yesql.se> wrote:
> The message is truncated in SetBackendCancelMessage() for safety, but
> pg_{cancel|terminate}_backend() could throw an error on too long message, or
> warning truncation, to the caller as well.  Personally I think a warning is the
> appropriate response, but I don’t really have a strong opinion.

And a NOTICE? That's what happens for relation name truncation. You
are right that having a check in SetBackendCancelMessage() makes the
most sense as bgworkers could just call the low level API. Isn't the
concept actually closer to just a backend message? This slot could be
used for other purposes than cancellation.
--
Michael



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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: [HACKERS] RLS in CTE incorrect permission failure
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] PATCH: Batch/pipelining support for libpq