On Wed, Jul 2, 2014 at 11:39 PM, Joe Conway <m...@joeconway.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 07/01/2014 11:55 PM, Fujii Masao wrote: >> Hmm... I found that you had marked this proposal as "Returned with >> Feedback". But I don't think that we reached the consensus to do >> that. I think that it's still worth discussing this topic in this >> CF. So I marked this as "Needs Review" again. >> >> If you strongly think that this proposal should be marked as >> "Returned with Feedback", could you let me know why you think so? > > Returned with Feedback means, well exactly that ;-) -- the patch as > linked to the CF page is wrong and cannot be applied the way it is > currently. It is therefore returned to you to be fixed. It does not > mean "Rejected" which is what you seem to infer.
I think that we should use "Waiting on Author" in that case. "Returned with Feedback" is not "Rejected". That's right. But it basically means that the bugfixed or revised version of the patch will NOT be reviewed in this CF. IOW, the author has to wait for the patch review until next CF. > As mentioned on the CF the documentation change is flat wrong, and you > yourself have said that you think PGC_SUSET is wrong now and > PGC_SIGHUP should be used instead. > > Furthermore I doubt you have tested the change to PGC_SIGHUP because I > did a quick test, and for some reason I haven't yet tracked down SHOW > does not see the change to log_disconnections as you said it would > after a reload, unlike other PGC_SIGHUP vars. No. If we change it to PGC_SIGHUP, SHOW command does display the changed value after a reload. It's the same behavior as other PGC_SIGHUP parameters do. Attached patch just changes it to PGC_SIGHUP. You can test that by using the patch. OTOH, the current behavior, i.e., log_disconnections with PGC_BACKEND, is that SHOW command doesn't display the changed value after a reload. > So there is more > thought, testing, and possibly coding needed to make this a viable change. +1 Regards, -- Fujii Masao
From 098f11cfbf8f9370829e24e9f8d704c050c98875 Mon Sep 17 00:00:00 2001 From: MasaoFujii <masao.fu...@gmail.com> Date: Fri, 13 Jun 2014 22:09:39 +0900 Subject: [PATCH] Make log_disconnections PGC_SUSET rather than PGC_SIGHUP. So far even non-superusers could disable log_disconnections in order to prevent their session logout from being logged because the parameter was defined with PGC_BACKEND. This was harmful in the systems which need to audit all session logouts by using log_disconnections. For this problem, this commit changes the GUC context of log_disconnections to PGC_SIGHUP and forbids any client from changing its setting. --- doc/src/sgml/config.sgml | 3 ++- src/backend/utils/misc/guc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 37d78b3..f5f0324 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4257,7 +4257,8 @@ local0.* /var/log/postgresql <varname>log_connections</varname> but at session termination, and includes the duration of the session. This is off by default. - This parameter cannot be changed after session start. + This parameter can only be set in the <filename>postgresql.conf</> + file or on the server command line. </para> </listitem> </varlistentry> diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 3a31a75..19e521b 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -919,7 +919,7 @@ static struct config_bool ConfigureNamesBool[] = NULL, NULL, NULL }, { - {"log_disconnections", PGC_BACKEND, LOGGING_WHAT, + {"log_disconnections", PGC_SIGHUP, LOGGING_WHAT, gettext_noop("Logs end of a session, including duration."), NULL }, -- 1.7.12.4 (Apple Git-37)
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers