<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 22, 2016 at 7:47 AM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">&gt; On Tue, Jun 21, 2016 at 6:11 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; &gt; Hi Ishii-San<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Can you please have a look at the attached patch, It try to solve this<br>
&gt;&gt; &gt; &quot;Kind does not match ..&quot; problem by ignoring the notice messages while<br>
&gt;&gt; &gt; reading the backend response in read_kind_from_backend() function<br>
&gt;&gt;<br>
&gt;&gt; Doesn&#39;t this patch simply ignore important messages like this?<br>
&gt;&gt;<br>
&gt;<br>
&gt; Basically patch only ignores the notice log messages and these messages are<br>
&gt; important, especially ones with severity level of WARNING and NOTICE, to<br>
&gt; inform the user about some critical issue.<br>
&gt; I may be wrong, but I don&#39;t think these log message are important in terms<br>
&gt; of PG protocol flow. i.e. notice (kind = &#39;N&#39;) message only contains the log<br>
&gt;  and is delivered to frontend (pgpool-II in our case) depending on<br>
</span>&gt; *client_min_messages* settings in postgresql.conf.<br>
<span class="">&gt; So I think it should be safe to ignore these.<br>
<br>
</span>Is it possible to send the NOTICE message (kind = N) to frontend,<br>
rather than discard it? By the time when read_kind_from_backend() gets<br>
called, all the messages are sent to frontend and it should be in the<br>
message boundary (i.e. not in the middle of the message packet), I<br>
guess it should be safe.<br></blockquote><div><br></div><div>This is a good idea, But since notice messages (packet kind = N) can contain a log for severity level ranging from DEBUG to WARNING<br></div><div>so instead of forwarding all notice type messages to frontend we should only froward the messages with severity &gt;= WARNING or may be consider pgpool&#39;s <span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px"><i>client_min_messages</i></span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold"> </span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px">config parameters and if the message received from backend has </span>severity &gt;= <span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px">client_min_messages only then forward it to the frontend</span></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px"><br></span></div>















<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5"><br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</div></div></blockquote></div><br></div></div>