[pgpool-general: 6135] Re: kind mismatch among backends with multiple clients and prepared statements

Tatsuo Ishii ishii at sraoss.co.jp
Fri Jun 22 15:20:32 JST 2018


Peter,

> Hello all,
> 
> i hope you can help me with this, thx in advance.
> 
> The scenario is:
> - a pgpool (version 3.7.4) instance using two backends, one of the
> - backends on the same host
> - two clients (PostgreSQL 9.6.2), heavily using transactions and
> - prepared statements
> 
> procedure to reproduce the problem:
> 1. let the two clients crash so there is no cleanup of the prepared
> statements (DEALLOCATE or DISCARD ALL) done by the clients
> 2. both clients are started again and add/execute their prepared
> statements again
> 
> the following error happens for both clients at some point after a lot
> of statements were already executed successfully:
> 
> Client A:
> 2018-06-20 07:41:49: pid 30748: LOG: DB node id: 1 backend pid: 10873
> statement: BEGIN
> 2018-06-20 07:41:49: pid 30748: WARNING: packet kind of backend 1
> ['A'] does not match with master/majority nodes packet kind ['C']
> 2018-06-20 07:41:49: pid 30748: FATAL: failed to read kind from
> backend
> 2018-06-20 07:41:49: pid 30748: DETAIL: kind mismatch among
> backends. Possible last query was: "BEGIN" kind details are: 0[C] 1[A]
> 2018-06-20 07:41:49: pid 30748: HINT: check data consistency among db
> nodes
> 
> Client B:
> 2018-06-20 07:41:50: pid 30746: LOG:  statement: BEGIN
> 2018-06-20 07:41:50: pid 30746: LOG: DB node id: 0 backend pid: 5060
> statement: BEGIN
> 2018-06-20 07:41:50: pid 30746: LOG: DB node id: 1 backend pid: 10894
> statement: BEGIN
> 2018-06-20 07:41:50: pid 30746: WARNING: packet kind of backend 1
> ['A'] does not match with master/majority nodes packet kind ['C']
> 2018-06-20 07:41:50: pid 30746: FATAL: failed to read kind from
> backend
> 2018-06-20 07:41:50: pid 30746: DETAIL: kind mismatch among
> backends. Possible last query was: "BEGIN" kind details are: 0[C] 1[A]
> 2018-06-20 07:41:50: pid 30746: HINT: check data consistency among db
> nodes
> 
> I attached the pgpool logs and the PostgreSQL log of Client A.
> 
> I found some bug reports regarding pgpool and prepared statements
> resulting in this error messages so i thought this may be another one.
> Could this be the reason for the issue or should i look somewhere
> else?

Please provide the PostgreSQL log when the error occured.

BTW, [A] is interesting since it indicates that it's a
NotificationResponse message from PostgreSQL. Are you using
LITEN/NOTIFY? If so, please provide a self contained test case.

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-general mailing list