pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_reload_conf()
4+ messages / 3 participants
[nested] [flat]
* pg_reload_conf()
@ 2023-02-20 16:57 Marc Millas <marc.millas@mokadb.com>
2023-02-20 17:01 ` Re: pg_reload_conf() Adrian Klaver <adrian.klaver@aklaver.com>
2023-02-20 17:21 ` Re: pg_reload_conf() David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Marc Millas @ 2023-02-20 16:57 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi,
maybe I am missing something...
with superuser rights, on a postgres 14 and postgres 15 version:
select setting, boot_val, reset_val from pg_settings where
name='log_connections';
off off off
alter system set log_connections to 'on';
select setting, boot_val, reset_val from pg_settings where
name='log_connections';
off off off
... strange
select pg_reload_conf();
t
select setting, boot_val, reset_val from pg_settings where
name='log_connections';
off off off
very strange.
cat postgresql.auto.conf
log_connections = 'on'
obviously, if I stop and restart the DB,
select setting, boot_val, reset_val from pg_settings where
name='log_connections';
on off on
So, I am perplexed: what pg_reload_conf() is doing/not doing ?
thanks
Marc MILLAS
Senior Architect
+33607850334
www.mokadb.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pg_reload_conf()
2023-02-20 16:57 pg_reload_conf() Marc Millas <marc.millas@mokadb.com>
@ 2023-02-20 17:01 ` Adrian Klaver <adrian.klaver@aklaver.com>
2023-02-20 20:36 ` Re: pg_reload_conf() Marc Millas <marc.millas@mokadb.com>
1 sibling, 1 reply; 4+ messages in thread
From: Adrian Klaver @ 2023-02-20 17:01 UTC (permalink / raw)
To: Marc Millas <marc.millas@mokadb.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On 2/20/23 08:57, Marc Millas wrote:
> select setting, boot_val, reset_val from pg_settings where
> name='log_connections';
# select setting, boot_val, reset_val, context from pg_settings where
name='log_connections';
setting | boot_val | reset_val | context
---------+----------+-----------+-------------------
on | off | on | superuser-backend
https://www.postgresql.org/docs/15/view-pg-settings.html
There are several possible values of context. In order of decreasing
difficulty of changing the setting, they are:
...
superuser-backend
Changes to these settings can be made in postgresql.conf without
restarting the server. They can also be set for a particular session in
the connection request packet (for example, via libpq's PGOPTIONS
environment variable), but only if the connecting user is a superuser or
has been granted the appropriate SET privilege. However, these settings
never change in a session after it is started. If you change them in
postgresql.conf, send a SIGHUP signal to the postmaster to cause it to
re-read postgresql.conf. The new values will only affect
subsequently-launched sessions.
...
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pg_reload_conf()
2023-02-20 16:57 pg_reload_conf() Marc Millas <marc.millas@mokadb.com>
2023-02-20 17:01 ` Re: pg_reload_conf() Adrian Klaver <adrian.klaver@aklaver.com>
@ 2023-02-20 20:36 ` Marc Millas <marc.millas@mokadb.com>
0 siblings, 0 replies; 4+ messages in thread
From: Marc Millas @ 2023-02-20 20:36 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Thanks Adrian,
the fact that the changes are visible only by the new backend, and NOT by
the backend which did the changes was what I did missed.
Marc MILLAS
Senior Architect
+33607850334
www.mokadb.com
On Mon, Feb 20, 2023 at 6:01 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
> On 2/20/23 08:57, Marc Millas wrote:
> > select setting, boot_val, reset_val from pg_settings where
> > name='log_connections';
>
> # select setting, boot_val, reset_val, context from pg_settings where
> name='log_connections';
> setting | boot_val | reset_val | context
> ---------+----------+-----------+-------------------
> on | off | on | superuser-backend
>
>
> https://www.postgresql.org/docs/15/view-pg-settings.html
>
> There are several possible values of context. In order of decreasing
> difficulty of changing the setting, they are:
>
>
> ...
>
> superuser-backend
>
> Changes to these settings can be made in postgresql.conf without
> restarting the server. They can also be set for a particular session in
> the connection request packet (for example, via libpq's PGOPTIONS
> environment variable), but only if the connecting user is a superuser or
> has been granted the appropriate SET privilege. However, these settings
> never change in a session after it is started. If you change them in
> postgresql.conf, send a SIGHUP signal to the postmaster to cause it to
> re-read postgresql.conf. The new values will only affect
> subsequently-launched sessions.
>
> ...
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pg_reload_conf()
2023-02-20 16:57 pg_reload_conf() Marc Millas <marc.millas@mokadb.com>
@ 2023-02-20 17:21 ` David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: David G. Johnston @ 2023-02-20 17:21 UTC (permalink / raw)
To: Marc Millas <marc.millas@mokadb.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Mon, Feb 20, 2023 at 9:57 AM Marc Millas <marc.millas@mokadb.com> wrote:
>
> select pg_reload_conf();
> t
>
> So, I am perplexed: what pg_reload_conf() is doing/not doing ?
>
It is sending a signal and stating success that said signal was sent.
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2023-02-20 20:36 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 16:57 pg_reload_conf() Marc Millas <marc.millas@mokadb.com>
2023-02-20 17:01 ` Adrian Klaver <adrian.klaver@aklaver.com>
2023-02-20 20:36 ` Marc Millas <marc.millas@mokadb.com>
2023-02-20 17:21 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox