[pgpool-committers: 3905] pgpool: Mega patch to fix "kind mismatch" (or derived) errors in stream
Tatsuo Ishii
ishii at postgresql.org
Wed Mar 29 16:20:35 JST 2017
Mega patch to fix "kind mismatch" (or derived) errors in streaming replication mode.
The errors are caused by wrong prediction in which (or both) database
node will send response to Pgpool-II. Previous implementation using
"sync map" are weak and sometimes fail in the prediction.
This patch introduces new implementation using "pending message
queue", which records all sent message to backends. The element of the
queue stores info regarding messages types
(parse/bind/execute/describe/close/sync), to which database node the
message was sent and so on. It's a simple FIFO queue. When a message
arrives from backend, by looking at the head of the "pending message
queue", it is possible to reliably predict what kind of message and
from which database node it will arrive. After receiving the message,
the element is removed from the queue.
I would like to thank to Sergey Kim, who has been helping me in
testing series of patches.
See bug 271:
http://www.pgpool.net/mantisbt/view.php?id=271
and discussion in pgpool-hackers mailing list [pgpool-hackers: 2043]
and [pgpool-hackers: 2140] for more details.
Branch
------
V3_6_STABLE
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=18f95017586aacb7254bbccda18ba67c01468483
Modified Files
--------------
src/auth/pool_auth.c | 13 +-
src/context/pool_query_context.c | 80 ++++-
src/context/pool_session_context.c | 545 +++++++++++++++++++---------
src/include/context/pool_query_context.h | 3 +-
src/include/context/pool_session_context.h | 107 +++---
src/include/pool.h | 2 +
src/include/protocol/pool_proto_modules.h | 9 +-
src/protocol/CommandComplete.c | 130 ++++---
src/protocol/pool_process_query.c | 556 +++++++++++++++--------------
src/protocol/pool_proto_modules.c | 424 +++++++++++++---------
src/query_cache/pool_memqcache.c | 12 +-
11 files changed, 1124 insertions(+), 757 deletions(-)
More information about the pgpool-committers
mailing list