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

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: [HACKERS] Optional message to user when terminating/cancelling backend
Дата
Msg-id E3859722-73F4-4692-AA4A-3B5757A992C9@yesql.se
обсуждение исходный текст
Ответ на Re: [HACKERS] Optional message to user when terminating/cancellingbackend  (Yugo Nagata <nagata@sraoss.co.jp>)
Ответы Re: [HACKERS] Optional message to user when terminating/cancelling backend  (Dilip Kumar <dilipbalaut@gmail.com>)
Re: [HACKERS] Optional message to user when terminating/cancelling backend  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
> On 22 Jun 2017, at 10:24, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>
> On Thu, 22 Jun 2017 09:24:54 +0900
> Michael Paquier <michael.paquier@gmail.com> wrote:
>
>> 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.
>
> +1 for NOTICE. The message truncation seems to be a kind of helpful
> information rather than a likely problem as long as pg_terminated_backend
> exits successfully.
>
> https://www.postgresql.org/docs/10/static/runtime-config-logging.html#runtime-config-severity-levels

Good point.  I’ve attached a new version which issues a NOTICE on truncation
and also addresses all other comments so far in this thread.  Thanks a lot for
the early patch reviews!

cheers ./daniel


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [HACKERS] Fix a typo in partition.c
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] intermittent failures in Cygwin from select_paralleltests