Fix queries hanging in parse_before_bind with extended protocol and replication ...
authorTatsuo Ishii <ishii@postgresql.org>
Thu, 18 Jan 2018 13:14:38 +0000 (22:14 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Thu, 18 Jan 2018 14:27:24 +0000 (23:27 +0900)
commit21451f92c9af42c946d99637d2e9e2e2199c672f
treed4948559400badfd22e1d9ceb191ca0ec4614429
parent0ac97a9c9600d1ec8c4cbd0bf30191beeb28ace9
Fix queries hanging in parse_before_bind with extended protocol and replication + load-balancing.

In case the client sends a BIND message for a query
that has not yet been parsed by the executing node,
the PARSE will be executed before attempting to BIND
the parameters.

However, during the execution of the PARSE, the session
context is not set to in_progress, which leads to wrong
backend validity tests in read_kind_from_backend which
in turn makes the process wait on a backend which is not
going to send anything.

Fixes bug #377.

Problem analysis and fix by Ancoron Luciferis and me.
src/protocol/pool_proto_modules.c