Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS) - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS) |
Date | |
Msg-id | 200305270231.h4R2VaA10426@candle.pha.pa.us Whole thread Raw |
Responses |
Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS)
|
List | pgsql-patches |
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > The reason it is PGC_USERSET is because we imagined people might want to > > increase the amount of information sent to the server logs, and we don't > > have an _increase_only_ restriction capability. However, maybe it > > should be PGC_SUSET. > > Yeah, probably so. Particularly with the 7.4 error message additions, > it'd be possible to make the logs very verbose indeed, which might be > seen as a form of attack (or at least a good way to hide your traces). I reviewed all the user-settable GUC variables and generated the following patch --- there were quite a few other setting that should be super-user only. -- 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 02:30:16 -0000 *************** *** 394,443 **** #ifdef USE_ASSERT_CHECKING { ! {"debug_assertions", PGC_USERSET}, &assert_enabled, true, NULL, NULL }, #endif { ! {"log_statement", PGC_USERSET}, &log_statement, false, NULL, NULL }, { ! {"log_duration", PGC_USERSET}, &log_duration, false, NULL, NULL }, { ! {"debug_print_parse", PGC_USERSET}, &Debug_print_parse, false, NULL, NULL }, { ! {"debug_print_rewritten", PGC_USERSET}, &Debug_print_rewritten, false, NULL, NULL }, { ! {"debug_print_plan", PGC_USERSET}, &Debug_print_plan, false, NULL, NULL }, { ! {"debug_pretty_print", PGC_USERSET}, &Debug_pretty_print, false, NULL, NULL }, { ! {"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 --- 394,443 ---- #ifdef USE_ASSERT_CHECKING { ! {"debug_assertions", PGC_SUSET}, &assert_enabled, true, NULL, NULL }, #endif { ! {"log_statement", PGC_SUSET}, &log_statement, false, NULL, NULL }, { ! {"log_duration", PGC_SUSET}, &log_duration, false, NULL, NULL }, { ! {"debug_print_parse", PGC_SUSET}, &Debug_print_parse, false, NULL, NULL }, { ! {"debug_print_rewritten", PGC_SUSET}, &Debug_print_rewritten, false, NULL, NULL }, { ! {"debug_print_plan", PGC_SUSET}, &Debug_print_plan, false, NULL, NULL }, { ! {"debug_pretty_print", PGC_SUSET}, &Debug_pretty_print, false, NULL, NULL }, { ! {"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 *************** *** 474,480 **** }, { ! {"trace_notify", PGC_USERSET}, &Trace_notify, false, NULL, NULL }, --- 474,480 ---- }, { ! {"trace_notify", PGC_SUSET}, &Trace_notify, false, NULL, NULL }, *************** *** 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 by date: