Skip site navigation (1) Skip section navigation (2)

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: syatskevich(at)n21lab(dot)gosniias(dot)msk(dot)ru,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] Bug #928: server_min_messages (log_min_messages
Date: 2003-05-27 04:39:56
Message-ID: 200305270439.h4R4dvl20878@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackerspgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > The reason I changed the debug_ ones is that those go directly to the
> > server log file, not to the client.
> 
> IIRC, all that stuff goes through elog (if there's anything left in the
> standard build that writes straight to stderr, we need to be fixing the
> code, not messing with GUC defaults).  So AFAIK the log_min_messages
> setting ought to control it all.  What are you seeing that I don't?

I tried this as a non-super user and saw the parser info in the logs.

Looking at the C code, the debug_* stuff goes to the logs as LOG.

I suppose you could set log_min_messages above LOG, but that seems too
dangerous.  I don't have a problem changing only the log_* settings, but
we shouldn't assume there is any way to protect the log file.  I think
we are restricting the log_* settings only so they can not be supressed
ffrom the logs.

---------------------------------------------------------------------------

test=> select current_user;
 current_user
--------------
 wilson
(1 row)

test=> set debug_print_parse to true;
SET
test=> select current_user;
 current_user
--------------
 wilson
(1 row)

test=> \q
(2) cat /u/pg/server.log
LOG:  database system was shut down at 2003-05-27 00:23:02 EDT
IN:  StartupXLOG (xlog.c:2510)
LOG:  checkpoint record is at 0/263D924
IN:  StartupXLOG (xlog.c:2538)
LOG:  redo record is at 0/263D924; undo record is at 0/0; shutdown TRUE
IN:  StartupXLOG (xlog.c:2558)
LOG:  next transaction id: 6216; next oid: 154373
IN:  StartupXLOG (xlog.c:2562)
LOG:  database system is ready
IN:  StartupXLOG (xlog.c:2819)
ERROR:  CREATE USER: user name "wilson" already exists
IN:  CreateUser (user.c:608)
ERROR:  parser: parse error at or near "current_user"
IN:  yyerror (scan.l:590)
LOG:  parse tree:
{QUERY :commandType 1 :querySource 0 :canSetTag true :utilityStmt <>
:resultRelation 0 :into <> :hasAggs false :hasSubLinks false :rtable <>
:jointree {FROMEXPR :fromlist <> :quals <>} :rowMarks () :targetList
({TARGETENTRY :resdom {RESDOM :resno 1 :restype 19 :restypmod -1 :resname
current_user :ressortgroupref 0 :resorigtbl 0 :resorigcol 0 :resjunk false}
:expr {FUNCEXPR :funcid 745 :funcresulttype 19 :funcretset false :funcformat 0
:args <>}}) :groupClause <> :havingQual <> :distinctClause <> :sortClause <>
:limitOffset <> :limitCount <> :setOperations <> :resultRelations ()}

IN:  elog_node_display (print.c:85)
(
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Gavin SherryDate: 2003-05-27 06:07:21
Subject: Re: Sequence usage patch
Previous:From: Tom LaneDate: 2003-05-27 04:21:09
Subject: Re: Sequence usage patch

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2003-05-27 04:59:48
Subject: Re: Continue: Bug #924: Segmentation fault in libpq/PQconsumeInput
Previous:From: Tom LaneDate: 2003-05-27 04:12:10
Subject: Re: [BUGS] Bug #928: server_min_messages (log_min_messages in CVS)

pgsql-patches by date

Next:From: Gavin SherryDate: 2003-05-27 06:07:21
Subject: Re: Sequence usage patch
Previous:From: Tom LaneDate: 2003-05-27 04:21:09
Subject: Re: Sequence usage patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group