[pgpool-committers: 3786] pgpool: Fix yet another kind mismatch error in streaming replication mo
Tatsuo Ishii
ishii at postgresql.org
Mon Jan 30 15:43:53 JST 2017
Fix yet another kind mismatch error in streaming replication mode.
1) Parse "BEGIN" using statement S1, and it is sent to both node 0 and 1.
2) Close S1.
3) Parse SELECT using S1, and it is sent to node 0 (or 1).
4) Bind retrieves info (sent_messages) regarding S1. Since Pgpool-II
only removes info on S1 when CloseComplete received, Bind decides
to send bind message to both node 0 & 1 because it was the info
regarding BEGIN. Node 0 or 1 tries to bind to non existent
statement S1.
As a result, something like "failed to read kind from backend.
kind mismatch among backends. Possible last query was: "BEGIN" kind
details are: 0[E: prepared statement "S1" does not exist] 1[3]
check data consistency among db nodes" occurs.
Note that in 3) if other than S1 is used, the problem does not occur.
Solution is, removing S1 when Close message is received. This problem
has been there since 3.5.0 was out.
Branch
------
V3_5_STABLE
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=4b67af5bc86f989b18dc74d074004c6a9ed65920
Modified Files
--------------
src/protocol/pool_proto_modules.c | 8 ++++++++
1 file changed, 8 insertions(+)
More information about the pgpool-committers
mailing list