pgpool2.git / summary / log / commit / refs
commit cfc4efa42bd77883ea633dd0c04ac7d47e202527
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Wed Jun 07 08:27:54 2017 +0000
Fix Pgpool-II hang when used by erlang applications.
Erlang client sends "Describe" message followed by "Flush". So the
backend returns "Row description." However Pgpool-II forgets to reset
the query in progress flag upon receiving "Row description" message,
then Pgpool-II keeps on waiting for response from backend. This is the
cause of erlang client hanging.
Fix is, just reset the query in progress flag upon receiving "Row
description" message. Same thing can be said to "no data" message.
Discussion: [pgpool-general: 5555]
http://www.pgpool.net/pipermail/pgpool-general/2017-June/005613.html
src/protocol/pool_proto_modules.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/protocol/pool_proto_modules.c b/src/protocol/pool_proto_modules.c
index 833d0c3ca..073a3c074 100644
--- a/src/protocol/pool_proto_modules.c
+++ b/src/protocol/pool_proto_modules.c
@@ -2714,13 +2714,13 @@ POOL_STATUS ProcessBackendResponse(POOL_CONNECTION *frontend,
case 'T': /* RowDescription */
status = SimpleForwardToFrontend(kind, frontend, backend);
- if ((REPLICATION || RAW_MODE) && pool_is_doing_extended_query_message())
+ if (pool_is_doing_extended_query_message())
pool_unset_query_in_progress();
break;
case 'n': /* NoData */
status = SimpleForwardToFrontend(kind, frontend, backend);
- if ((REPLICATION || RAW_MODE) && pool_is_doing_extended_query_message())
+ if (pool_is_doing_extended_query_message())
pool_unset_query_in_progress();
break;
[parent: c1892fffde8b]