Re: [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to aspecific backend - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Re: [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to aspecific backend
Date
Msg-id CA+q6zcX59yZ0LSEnzs3YuYXLc+EXKawYsOzcnPYr--sEgJzwJQ@mail.gmail.com
Whole thread Raw
In response to [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to a specific backend  (Yugo Nagata <nagata@sraoss.co.jp>)
Responses Re: [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to aspecific backend  (Yugo Nagata <nagata@sraoss.co.jp>)
List pgsql-hackers
> On 28 June 2017 at 12:17, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>
> 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.

I have few questions. I'm curious, why this function returns something
different from bool when I'm passing null as an argument?

=# select pg_reload_backend(27961);
WARNING:  PID 27961 is not a PostgreSQL server process
WARNING:  failed to send signal to backend: 27961
 pg_reload_backend
-------------------
 f
(1 row)

=# select pg_reload_backend(27962);
 pg_reload_backend
-------------------
 t
(1 row)

=# select pg_reload_backend(null);
 pg_reload_backend
-------------------

(1 row)

Also for some reason I can't grant an execute permission on this function,
am I doing something wrong?

=# grant execute on function pg_reload_backend() to test_user;
ERROR:  function pg_reload_backend() does not exist
=# grant execute on function pg_reload_conf() to test_user;
GRANT

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [HACKERS] pg_receivewal and messages printed in non-verbose mode
Next
From: Amit Khandekar
Date:
Subject: Re: [HACKERS] UPDATE of partition key