<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 22, 2016 at 7:06 PM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">> On Wed, Jun 22, 2016 at 7:47 AM, Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>> wrote:<br>
><br>
>> > On Tue, Jun 21, 2016 at 6:11 AM, Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>><br>
>> wrote:<br>
>> ><br>
>> >> > Hi Ishii-San<br>
>> >> ><br>
>> >> > Can you please have a look at the attached patch, It try to solve this<br>
>> >> > "Kind does not match .." problem by ignoring the notice messages while<br>
>> >> > reading the backend response in read_kind_from_backend() function<br>
>> >><br>
>> >> Doesn't this patch simply ignore important messages like this?<br>
>> >><br>
>> ><br>
>> > Basically patch only ignores the notice log messages and these messages<br>
>> are<br>
>> > important, especially ones with severity level of WARNING and NOTICE, to<br>
>> > inform the user about some critical issue.<br>
>> > I may be wrong, but I don't think these log message are important in<br>
>> terms<br>
>> > of PG protocol flow. i.e. notice (kind = 'N') message only contains the<br>
>> log<br>
>> > and is delivered to frontend (pgpool-II in our case) depending on<br>
>> > *client_min_messages* settings in postgresql.conf.<br>
>> > So I think it should be safe to ignore these.<br>
>><br>
>> 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>
>><br>
><br>
> This is a good idea, But since notice messages (packet kind = N) can<br>
> contain a log for severity level ranging from DEBUG to WARNING<br>
> so instead of forwarding all notice type messages to frontend we should<br>
> only froward the messages with severity >= WARNING or may be consider<br>
</div></div>> pgpool's *client_min_messages* config parameters and if the message<br>
<span class="">> received from backend has severity >= client_min_messages only then forward<br>
> it to the frontend<br>
<br>
</span>? PostgreSQL has already decided which message should be sent to<br>
client (in this case pgpool) based on client_min_messages setting in<br>
postgresql.conf. So pgpool can unconditionally forward the kind = N<br>
packet to client. <br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Pgpool's *client_min_messages* is another story. I think it should<br>
only affect to messages generated in pgpool.<br></blockquote><div><br></div><div>Totally agreed on both the points. I think you have a valid point and unconditionally forwarding all the kind = N messages to frontend is the best choice. The attached version 2 of the patch does the same as suggested.</div><div><br></div><div>Best Regards</div><div>Muhammad Usama</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><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>