[HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to a specific backend

Поиск
Список
Период
Сортировка
От Yugo Nagata
Тема [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to a specific backend
Дата
Msg-id 20170628191756.8c7a012d.nagata@sraoss.co.jp
обсуждение исходный текст
Ответы Re: [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to aspecific backend  (Dmitry Dolgov <9erthalion6@gmail.com>)
Re: [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to aspecific backend  (Remi Colinet <remi.colinet@gmail.com>)
Список pgsql-hackers
Hi,

Attached is a patch of pg_reload_backend that is a function signaling
SIGHUP to a specific backend. The original idea is from Michael Paquier[1].
The documatation isn't included in this patch yet.

We can change some parameters of other backend using the function
as bellow.

postgres=# alter system set log_min_messages to debug2;
ALTER SYSTEM
postgres=# select pg_reload_backend(18375);
 pg_reload_backend 
-------------------
 t
(1 row)

There are some usecases. For example:

- changing log configuration in other backends temporally.
- changing cost parameters for planner in other backends.
- changing autovacuum parameters of an already running autovacuum worker.


Hoever, this function need the superuser previlige to execute as well as
pg_reload_conf(). Although we can grant the execution to public, it is
useless for normal users bacause only superuser can change postgresql.conf.

To allow normal users to change parameters in ohter backends, instead
we might want another feature, for example, a function like set_config()
than can change other backend's parameters using shared memory and SIGUSR1.

Any comments would be appreciated.

Regards,

[1]
https://www.postgresql.org/message-id/CAB7nPqT4y8-QoGKEugk99_tFuEOtAshcs5kxOeZ_0w27UtdGyA%40mail.gmail.com

-- 
Yugo Nagata <nagata@sraoss.co.jp>

-- 
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 по дате отправления:

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: [HACKERS] Small comment fix in partition.c
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [HACKERS] pg_receivewal and messages printed in non-verbose mode