Re: Why is LOG level below WARNING and ERROR for log_min_error_statement?

From: Kal Sze <swordangel(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Why is LOG level below WARNING and ERROR for log_min_error_statement?
Date: 2015-06-05 05:58:53
Message-ID: CAGZiy73cZ-15abw82rt=kT9axLjubYH9Mu1NFOemV1kxSwNRag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 5 June 2015 at 13:27, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Kal Sze <swordangel(at)gmail(dot)com> writes:
>> I'm trying to debug a problem that is occurring rather rarely, which
>> causes multiple clients connected to the same postgresql 9.4 server to
>> crash at the same time.
>
>> These clients send *lots* of SQL statements. I want to turn on
>> statement logging, but I am baffled by the fact that the LOG level is
>> *below* WARNING and ERROR levels, for the `log_min_error_statement`
>> configuration option. This results in my log being flooded with
>> useless messages about statements that have succeeded.
>
>> Why is it designed like that?
>
> LOG level is meant for non-client-facing log messages, which should get
> sent to the postmaster log even if log_min_messages has been set high
> enough to suppress logging of everyday SQL-statement errors. On the other
> hand, they're not meant for client consumption so they don't get sent to
> the client at the default client_min_messages setting.
>
> You didn't say exactly where the problematic messages are coming from,
> but it sounds a bit like somebody on the client side misunderstood what
> they should use LOG for.
>
> regards, tom lane

I want to turn on statement logging on the server side, not sending
the messages to the clients.

Right now, I don't even know where the problematic messages come from,
which is why I want to turn on statement logging on the server side.
All I know is that both clients crash at the same time while
performing some COPYs in a transaction. And I suspect it's a problem
with this particular server instance because I have another,
physically separate setup of server and clients, and that setup is not
crashing.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Kal Sze 2015-06-05 06:12:40 Re: Why is LOG level below WARNING and ERROR for log_min_error_statement?
Previous Message Tom Lane 2015-06-05 05:27:31 Re: Why is LOG level below WARNING and ERROR for log_min_error_statement?