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

Поиск
Список
Период
Сортировка
От Christoph Berg
Тема Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Дата
Msg-id 20180320124142.GC32205@msg.df7cb.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Optional message to user when terminating/cancelling backend  (Eren Başak <eren@citusdata.com>)
Список pgsql-hackers
Re: Eren Başak 2018-03-20 <CAFNTstPcstV8Brqkg00a84V72b_FfnLinhu2C2Top+QssmwFhg@mail.gmail.com>
> Another thing is that, in a similar manner, we could allow changing the
> error code which might be useful for extensions. For example, Citus could
> use it to cancel remote backends when it detects a distributed deadlock and
> changes the error code to something retryable while doing so.

Another useful thing to do on top of this patch would be to include
messages when the termination comes from postgres itself, e.g. on a
server shutdown. Possibly, the message for pg_terminate_backend() itself could
say that someone invoke that, unless overridden.

FATAL:  57P01: terminating connection due to administrator command: server shutting down
FATAL:  57P01: terminating connection due to administrator command: restarting because of a crash of another server
process
FATAL:  57P01: terminating connection due to administrator command: terminated by pg_terminate_backend()

Christoph


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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning
Следующее
От: "Tels"
Дата:
Сообщение: Re: [HACKERS] plpgsql - additional extra checks