pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection
4+ messages / 2 participants
[nested] [flat]
* pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection
@ 2014-09-14 01:02 Tom Lane <tgl@sss.pgh.pa.us>
2015-03-15 15:07 ` Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Magnus Hagander <magnus@hagander.net>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2014-09-14 01:02 UTC (permalink / raw)
To: pgsql-committers
Invent PGC_SU_BACKEND and mark log_connections/log_disconnections that way.
This new GUC context option allows GUC parameters to have the combined
properties of PGC_BACKEND and PGC_SUSET, ie, they don't change after
session start and non-superusers can't change them. This is a more
appropriate choice for log_connections and log_disconnections than their
previous context of PGC_BACKEND, because we don't want non-superusers
to be able to affect whether their sessions get logged.
Note: the behavior for log_connections is still a bit odd, in that when
a superuser attempts to set it from PGOPTIONS, the setting takes effect
but it's too late to enable or suppress connection startup logging.
It's debatable whether that's worth fixing, and in any case there is
a reasonable argument for PGC_SU_BACKEND to exist.
In passing, re-pgindent the files touched by this commit.
Fujii Masao, reviewed by Joe Conway and Amit Kapila
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/fe550b2ac249af5fbd8e9e19290a4ba43c882f2d
Modified Files
--------------
doc/src/sgml/config.sgml | 16 +++++----
src/backend/tcop/postgres.c | 2 +-
src/backend/utils/init/postinit.c | 4 +--
src/backend/utils/misc/guc.c | 66 +++++++++++++++++++++++--------------
src/include/utils/guc.h | 20 ++++++-----
5 files changed, 65 insertions(+), 43 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection
2014-09-14 01:02 pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Tom Lane <tgl@sss.pgh.pa.us>
@ 2015-03-15 15:07 ` Magnus Hagander <magnus@hagander.net>
2015-03-15 15:29 ` Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Magnus Hagander @ 2015-03-15 15:07 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
This patch seems to have forgotten to update the documentation. In
particular,
http://www.postgresql.org/docs/devel/static/view-pg-settings.html is
completely unaware of it, which is clearly wrong.
//Magnus
On Sun, Sep 14, 2014 at 3:02 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Invent PGC_SU_BACKEND and mark log_connections/log_disconnections that way.
>
> This new GUC context option allows GUC parameters to have the combined
> properties of PGC_BACKEND and PGC_SUSET, ie, they don't change after
> session start and non-superusers can't change them. This is a more
> appropriate choice for log_connections and log_disconnections than their
> previous context of PGC_BACKEND, because we don't want non-superusers
> to be able to affect whether their sessions get logged.
>
> Note: the behavior for log_connections is still a bit odd, in that when
> a superuser attempts to set it from PGOPTIONS, the setting takes effect
> but it's too late to enable or suppress connection startup logging.
> It's debatable whether that's worth fixing, and in any case there is
> a reasonable argument for PGC_SU_BACKEND to exist.
>
> In passing, re-pgindent the files touched by this commit.
>
> Fujii Masao, reviewed by Joe Conway and Amit Kapila
>
> Branch
> ------
> master
>
> Details
> -------
>
> http://git.postgresql.org/pg/commitdiff/fe550b2ac249af5fbd8e9e19290a4ba43c882f2d
>
> Modified Files
> --------------
> doc/src/sgml/config.sgml | 16 +++++----
> src/backend/tcop/postgres.c | 2 +-
> src/backend/utils/init/postinit.c | 4 +--
> src/backend/utils/misc/guc.c | 66
> +++++++++++++++++++++++--------------
> src/include/utils/guc.h | 20 ++++++-----
> 5 files changed, 65 insertions(+), 43 deletions(-)
>
>
> --
> Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers
>
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection
2014-09-14 01:02 pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Tom Lane <tgl@sss.pgh.pa.us>
2015-03-15 15:07 ` Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Magnus Hagander <magnus@hagander.net>
@ 2015-03-15 15:29 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-03-15 15:47 ` Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Magnus Hagander <magnus@hagander.net>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2015-03-15 15:29 UTC (permalink / raw)
To: Magnus Hagander <magnus@hagander.net>; +Cc: pgsql-committers
Magnus Hagander <magnus@hagander.net> writes:
> This patch seems to have forgotten to update the documentation.
That characterization seems a bit unfair ...
> http://www.postgresql.org/docs/devel/static/view-pg-settings.html is
> completely unaware of it, which is clearly wrong.
... but yeah, we missed that list. Will fix, thanks for pointing it out.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection
2014-09-14 01:02 pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Tom Lane <tgl@sss.pgh.pa.us>
2015-03-15 15:07 ` Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Magnus Hagander <magnus@hagander.net>
2015-03-15 15:29 ` Re: pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Tom Lane <tgl@sss.pgh.pa.us>
@ 2015-03-15 15:47 ` Magnus Hagander <magnus@hagander.net>
0 siblings, 0 replies; 4+ messages in thread
From: Magnus Hagander @ 2015-03-15 15:47 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
On Sun, Mar 15, 2015 at 4:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> > This patch seems to have forgotten to update the documentation.
>
> That characterization seems a bit unfair ...
>
The only place in the documentation that actually has a list of the
contexts was not updated...
But OK, I'll grant you that. To be more fair, the part about the newly
added *context* was missing, the part about the variables that were changed
*was* included in the docs changes.
> > http://www.postgresql.org/docs/devel/static/view-pg-settings.html is
> > completely unaware of it, which is clearly wrong.
>
> ... but yeah, we missed that list. Will fix, thanks for pointing it out.
>
Thanks!
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2015-03-15 15:47 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-09-14 01:02 pgsql: Invent PGC_SU_BACKEND and mark log_connections/log_disconnection Tom Lane <tgl@sss.pgh.pa.us>
2015-03-15 15:07 ` Magnus Hagander <magnus@hagander.net>
2015-03-15 15:29 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-03-15 15:47 ` Magnus Hagander <magnus@hagander.net>
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