Suggestion to improve select pg_reload_conf()

Started by Thomas Kellererabout 9 years ago3 messagesgeneral
Jump to latest
#1Thomas Kellerer
spam_eater@gmx.net

I would like to suggest an improvement to the select pg_reload_conf() function.

Currently this will only return true or false indicating if reloading was successful.

I think it would be a "nice-to-have" if the function would also return the GUCs that have been changed, similar to what is being written to the logfile.

To not break existing code (e.g. scripts that only expect true/false), this could be done through an optional boolean parameter (e.g. named "verbose").

Any thoughts?

Thomas

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

#2Achilleas Mantzios
achill@matrix.gatewaynet.com
In reply to: Thomas Kellerer (#1)
Re: Suggestion to improve select pg_reload_conf()

On 03/04/2017 10:31, Thomas Kellerer wrote:

I would like to suggest an improvement to the select pg_reload_conf() function.

Currently this will only return true or false indicating if reloading was successful.

I think it would be a "nice-to-have" if the function would also return the GUCs that have been changed, similar to what is being written to the logfile.

To not break existing code (e.g. scripts that only expect true/false), this could be done through an optional boolean parameter (e.g. named "verbose").

To my understanding pg_reload_conf just SIGHUP's the postmaster. So it might not be so trivial.

Any thoughts?

Thomas

--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

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

#3Michael Paquier
michael@paquier.xyz
In reply to: Achilleas Mantzios (#2)
Re: Suggestion to improve select pg_reload_conf()

On Mon, Apr 3, 2017 at 4:39 PM, Achilleas Mantzios
<achill@matrix.gatewaynet.com> wrote:

On 03/04/2017 10:31, Thomas Kellerer wrote:

I would like to suggest an improvement to the select pg_reload_conf()
function.

Currently this will only return true or false indicating if reloading was
successful.

I think it would be a "nice-to-have" if the function would also return the
GUCs that have been changed, similar to what is being written to the
logfile.

To not break existing code (e.g. scripts that only expect true/false),
this could be done through an optional boolean parameter (e.g. named
"verbose").

To my understanding pg_reload_conf just SIGHUP's the postmaster. So it might
not be so trivial.

Yup. But there is a workaround possible at SQL-level to know what are
the parameters that would be updated on SIGHUP by comparing the values
in pg_file_settings that are the values found in the configuration
files with the current settings applied in pg_settings.
--
Michael

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