Re: [BUGS] Bug #928: server_min_messages (log_min_messages

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: [BUGS] Bug #928: server_min_messages (log_min_messages
Дата
в 13:55:12
Msg-id
200305271755.h4RHt0o03094@candle.pha.pa.us
Ответ на
Список
Дерево обсуждения
Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS) Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Bug #928: server_min_messages (log_min_messages Bruce Momjian <pgman@candle.pha.pa.us>
Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS) Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Bug #928: server_min_messages (log_min_messages Bruce Momjian <pgman@candle.pha.pa.us>
Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS) Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Bug #928: server_min_messages (log_min_messages Bruce Momjian <pgman@candle.pha.pa.us>
Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS) Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Bug #928: server_min_messages (log_min_messages Bruce Momjian <pgman@candle.pha.pa.us>
Re: [BUGS] Bug #928: server_min_messages (log_min_messages Bruce Momjian <pgman@candle.pha.pa.us>
> A fuller description of what I'm thinking of:
> 
> * log_min_messages should indeed be SUSET, and also the other log_xxx
> switches.

Let me address this.  By making log SUSET, we prevent non-super users
from turning it off, but we also prevent them from turning it on,
especially using per-user/db methods.

The only solution I can think of would be to have a new permission level
between USERSET and SUSET, where the boolean could be turned on by
non-super users, but not turned off, but then again, that adds the
ability to fill up the server logs.

I am not sure how much that is used, so I am not inclined to add it at
this time, but some day, it might be needed.

Patch to tighten log_* attached and applied.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v
retrieving revision 1.124
diff -c -c -r1.124 guc.c
*** src/backend/utils/misc/guc.c	14 May 2003 03:26:02 -0000	1.124
--- src/backend/utils/misc/guc.c	27 May 2003 04:01:08 -0000
***************
*** 400,410 ****
  #endif
  
  	{
! 		{"log_statement", PGC_USERSET}, &log_statement,
  		false, NULL, NULL
  	},
  	{
! 		{"log_duration", PGC_USERSET}, &log_duration,
  		false, NULL, NULL
  	},
  	{
--- 400,410 ----
  #endif
  
  	{
! 		{"log_statement", PGC_SUSET}, &log_statement,
  		false, NULL, NULL
  	},
  	{
! 		{"log_duration", PGC_SUSET}, &log_duration,
  		false, NULL, NULL
  	},
  	{
***************
*** 425,443 ****
  	},
  
  	{
! 		{"log_parser_stats", PGC_USERSET}, &log_parser_stats,
  		false, NULL, NULL
  	},
  	{
! 		{"log_planner_stats", PGC_USERSET}, &log_planner_stats,
  		false, NULL, NULL
  	},
  	{
! 		{"log_executor_stats", PGC_USERSET}, &log_executor_stats,
  		false, NULL, NULL
  	},
  	{
! 		{"log_statement_stats", PGC_USERSET}, &log_statement_stats,
  		false, NULL, NULL
  	},
  #ifdef BTREE_BUILD_STATS
--- 425,443 ----
  	},
  
  	{
! 		{"log_parser_stats", PGC_SUSET}, &log_parser_stats,
  		false, NULL, NULL
  	},
  	{
! 		{"log_planner_stats", PGC_SUSET}, &log_planner_stats,
  		false, NULL, NULL
  	},
  	{
! 		{"log_executor_stats", PGC_SUSET}, &log_executor_stats,
  		false, NULL, NULL
  	},
  	{
! 		{"log_statement_stats", PGC_SUSET}, &log_statement_stats,
  		false, NULL, NULL
  	},
  #ifdef BTREE_BUILD_STATS
***************
*** 791,797 ****
  	},
  
  	{
! 		{"log_min_error_statement", PGC_USERSET}, &log_min_error_statement_str,
  		"panic", assign_min_error_statement, NULL
  	},
  
--- 791,797 ----
  	},
  
  	{
! 		{"log_min_error_statement", PGC_SUSET}, &log_min_error_statement_str,
  		"panic", assign_min_error_statement, NULL
  	},
  
***************
*** 878,884 ****
  	},
  
  	{
! 		{"log_min_messages", PGC_USERSET}, &log_min_messages_str,
  		"notice", assign_log_min_messages, NULL
  	},
  
--- 878,884 ----
  	},
  
  	{
! 		{"log_min_messages", PGC_SUSET}, &log_min_messages_str,
  		"notice", assign_log_min_messages, NULL
  	},
  
В списке pgsql-patches по дате отправления
От: Bruce Momjian
Дата:
От: Peter Eisentraut
Дата:
FAQ