[pgpool-hackers: 1652] Re: kind does not match error in pgpool

Tatsuo Ishii ishii at postgresql.org
Wed Jun 22 23:06:26 JST 2016


> On Wed, Jun 22, 2016 at 7:47 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:
> 
>> > On Tue, Jun 21, 2016 at 6:11 AM, Tatsuo Ishii <ishii at postgresql.org>
>> wrote:
>> >
>> >> > Hi Ishii-San
>> >> >
>> >> > Can you please have a look at the attached patch, It try to solve this
>> >> > "Kind does not match .." problem by ignoring the notice messages while
>> >> > reading the backend response in read_kind_from_backend() function
>> >>
>> >> Doesn't this patch simply ignore important messages like this?
>> >>
>> >
>> > Basically patch only ignores the notice log messages and these messages
>> are
>> > important, especially ones with severity level of WARNING and NOTICE, to
>> > inform the user about some critical issue.
>> > I may be wrong, but I don't think these log message are important in
>> terms
>> > of PG protocol flow. i.e. notice (kind = 'N') message only contains the
>> log
>> >  and is delivered to frontend (pgpool-II in our case) depending on
>> > *client_min_messages* settings in postgresql.conf.
>> > So I think it should be safe to ignore these.
>>
>> Is it possible to send the NOTICE message (kind = N) to frontend,
>> rather than discard it? By the time when read_kind_from_backend() gets
>> called, all the messages are sent to frontend and it should be in the
>> message boundary (i.e. not in the middle of the message packet), I
>> guess it should be safe.
>>
> 
> This is a good idea, But since notice messages (packet kind = N) can
> contain a log for severity level ranging from DEBUG to WARNING
> so instead of forwarding all notice type messages to frontend we should
> only froward the messages with severity >= WARNING or may be consider
> pgpool's *client_min_messages* config parameters and if the message
> received from backend has severity >= client_min_messages only then forward
> it to the frontend

? PostgreSQL has already decided which message should be sent to
client (in this case pgpool) based on client_min_messages setting in
postgresql.conf. So pgpool can unconditionally forward the kind = N
packet to client.

Pgpool's *client_min_messages* is another story. I think it should
only affect to messages generated in pgpool.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list