Re: BUG #9186: CONTEXT log line still appears when turned off

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: mduyunov(at)avito(dot)ru, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9186: CONTEXT log line still appears when turned off
Date: 2014-04-19 14:46:31
Message-ID: 20140419144631.GC31555@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Apr 19, 2014 at 03:35:52PM +0200, Andres Freund wrote:
> Hi,
>
> On 2014-04-19 09:27:00 -0400, Bruce Momjian wrote:
> > Can anyone comment on this? I am able reproduce this in head, and the
> > behavior does look odd. I am able to see the error by just doing:
> >
> > SET log_min_error_statement = notice;
> >
> > in a session before calling the functions; I didn't need to modify
> > postgresql.conf. I am not sure even where to start in debugging this.
>
> Aren't CONTEXT messages influenced by log_error_verbosity, rather than
> log_min_error_statement?

Thanks. I was confused by this, and I can see how the user was confused
because of the way the log message appears in the email, though that
might be just cut/past wrapping:

2014-02-11 18:03:42 MSK
pid=6601,user=postgres,db=dbname,host=10.7.170.1(61351) NOTICE: Hello,
Maxim
2014-02-11 18:03:42 MSK
pid=6601,user=postgres,db=dbname,host=10.7.170.1(61351) CONTEXT: SQL
statement "SELECT test_func('Maxim')"
PL/pgSQL function test_call2() line 3 at PERFORM

That "statement" is not generated by log_min_error_statement, but rather
is part of the CONTEXT line.

Using log_error_verbosity=terse does allow the notice to appear in the
logs without the context.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-04-19 15:22:50 Re: BUG #9186: CONTEXT log line still appears when turned off
Previous Message Andres Freund 2014-04-19 13:35:52 Re: BUG #9186: CONTEXT log line still appears when turned off