Fix for log_min_error_messages

Поиск
Список
Период
Сортировка
Искать

Fix for log_min_error_messages

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Due to my error, log_min_error messages went into 7.3.X with the wrong
default, and the wrong listed options.

This fixes the bug in CVS current and 7.3.X.  Patch attached.

-- 
  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.111
diff -c -c -r1.111 guc.c
*** src/backend/utils/misc/guc.c	25 Jan 2003 23:10:27 -0000	1.111
--- src/backend/utils/misc/guc.c	27 Jan 2003 23:39:15 -0000
***************
*** 101,107 ****
  
  bool		Password_encryption = true;
  
! int			log_min_error_statement = ERROR;
  char	   *log_min_error_statement_str = NULL;
  const char	log_min_error_statement_str_default[] = "panic";
  
--- 101,107 ----
  
  bool		Password_encryption = true;
  
! int			log_min_error_statement = PANIC;
  char	   *log_min_error_statement_str = NULL;
  const char	log_min_error_statement_str_default[] = "panic";
  
Index: src/backend/utils/misc/postgresql.conf.sample
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.66
diff -c -c -r1.66 postgresql.conf.sample
*** src/backend/utils/misc/postgresql.conf.sample	25 Jan 2003 23:10:29 -0000	1.66
--- src/backend/utils/misc/postgresql.conf.sample	27 Jan 2003 23:39:15 -0000
***************
*** 134,140 ****
  
  #log_min_error_statement = error # Values in order of increasing severity:
  				 #   debug5, debug4, debug3, debug2, debug1,
! 				 #   info, notice, warning, error
  
  #debug_print_parse = false
  #debug_print_rewritten = false
--- 134,140 ----
  
  #log_min_error_statement = error # Values in order of increasing severity:
  				 #   debug5, debug4, debug3, debug2, debug1,
! 				 #   info, notice, warning, error, panic(off)
  
  #debug_print_parse = false
  #debug_print_rewritten = false

Re: Fix for log_min_error_messages

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Bruce Momjian writes:

> Due to my error, log_min_error messages went into 7.3.X with the wrong
> default, and the wrong listed options.
>
> This fixes the bug in CVS current and 7.3.X.  Patch attached.

Why does "panic" mean "off"?  If you set it to "panic" don't you still get
the "panic" messages?  I'm sure the implementation makes sense, but the
way it's documented seems confusing.

-- 
Peter Eisentraut   peter_e@gmx.net


Re: Fix for log_min_error_messages

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Peter Eisentraut wrote:
> Bruce Momjian writes:
> 
> > Due to my error, log_min_error messages went into 7.3.X with the wrong
> > default, and the wrong listed options.
> >
> > This fixes the bug in CVS current and 7.3.X.  Patch attached.
> 
> Why does "panic" mean "off"?  If you set it to "panic" don't you still get
> the "panic" messages?  I'm sure the implementation makes sense, but the
> way it's documented seems confusing.

Yep, it is really weird.  Gavin didn't want to have separate routines to
validate the various flags, so all the "level" messages can take all the
possible values, and there is no 'off' so "panic" seems the best.
only meaningful ones.

I now realize panic isn't really off, but I don't expect panic to happen
too often.  :-)

--  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

Re: Fix for log_min_error_messages

От:
Gavin Sherry <swm@linuxworld.com.au>
Дата:
On Tue, 28 Jan 2003, Bruce Momjian wrote:

> Peter Eisentraut wrote:
> > Bruce Momjian writes:
> > 
> > > Due to my error, log_min_error messages went into 7.3.X with the wrong
> > > default, and the wrong listed options.
> > >
> > > This fixes the bug in CVS current and 7.3.X.  Patch attached.
> > 
> > Why does "panic" mean "off"?  If you set it to "panic" don't you still get
> > the "panic" messages?  I'm sure the implementation makes sense, but the
> > way it's documented seems confusing.
> 
> Yep, it is really weird.  Gavin didn't want to have separate routines to
> validate the various flags, so all the "level" messages can take all the
> possible values, and there is no 'off' so "panic" seems the best.
> only meaningful ones.

I offered, from memory, three different possible solutions. setting it to
PANIC seemed the most popular.

Gavin


Re: Fix for log_min_error_messages

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Bruce Momjian writes:

> I now realize panic isn't really off, but I don't expect panic to happen
> too often.  :-)

Just add a level past panic that actually says "off" and really is off.

-- 
Peter Eisentraut   peter_e@gmx.net


Re: Fix for log_min_error_messages

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  writes:
> Bruce Momjian writes:
>> I now realize panic isn't really off, but I don't expect panic to happen
>> too often.  :-)

> Just add a level past panic that actually says "off" and really is off.

Would anyone actually use it?  *Should* anyone actually use it?
I cannot imagine a situation where you don't want to see panic messages
(besides, there's always the option of routing the log to /dev/null...)
		regards, tom lane

FAQ