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

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: [HACKERS] Optional message to user when terminating/cancelling backend
Дата
Msg-id 4614BA96-0085-4139-8C18-0552FFF66AF8@yesql.se
обсуждение исходный текст
Ответ на Re: [HACKERS] Optional message to user when terminating/cancellingbackend  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: [HACKERS] Optional message to user when terminating/cancelling backend
Список pgsql-hackers
> On 24 Jan 2018, at 16:45, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> A quick suggestion from a passer-by -- would you put the new code in
> src/backend/storage/ipc/backend_signal.c instead?  Sounds like a better
> place than utils/misc/; and "signal" is more general in nature than just
> "cancel".  A bunch of stuff from utils/adt/misc.c (???) can migrate to
> the new file -- everything from line 201 to 362 at least, that is:
>
> pg_signal_backend
> pg_cancel_backend
> pg_terminate_backend
> pg_reload_conf
> pg_rotate_logfile

+1, this makes a lot of sense.  When writing this I didn’t find a good fit
anywhere so I modelled it after utils/misc/backend_random.c, not because it was
a good fit but it was the least bad one I could come up with.  This seems a lot
cleaner.

> Maybe have two patches, 0001 creates the files moving the contents over,
> then 0002 adds your new stuff on top.

The two attached patches implements this.

> /me wonders if there's anything that would suggest to make this
> extensive to processes other than backends ...

Perhaps, do you have an API in mind?

cheers ./daniel


Вложения

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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: PATCH: pgbench - option to build using ppoll() for largerconnection counts
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [HACKERS] GnuTLS support