pgpool2.git / summary / log / commit / refs

commit    0c0e727348f81b2d4fc273dceda6b64ed9463dbb
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Sun May 22 01:07:47 2016 +0000

    Fix extended protocol handling in raw mode
    
    Bug152 reveals that extended protocol handling in raw mode (actually
    other than in stream mode) was wrong in Describe() and Close().
    Unlike stream mode, they should wait for backend response.


src/protocol/pool_proto_modules.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/protocol/pool_proto_modules.c b/src/protocol/pool_proto_modules.c index 8913c1ecf..9537ec7aa 100644 --- a/src/protocol/pool_proto_modules.c +++ b/src/protocol/pool_proto_modules.c @@ -1350,13 +1350,13 @@ POOL_STATUS Describe(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, ereport(DEBUG1, (errmsg("Describe: waiting for master completing the query"))); - nowait = (REPLICATION? false: true); + nowait = (STREAM? true: false); pool_set_query_in_progress(); pool_extended_send_and_wait(query_context, "D", len, contents, 1, MASTER_NODE_ID, nowait); pool_extended_send_and_wait(query_context, "D", len, contents, -1, MASTER_NODE_ID, nowait); - if (!REPLICATION) + if (STREAM) pool_unset_query_in_progress(); return POOL_CONTINUE; @@ -1424,7 +1424,7 @@ POOL_STATUS Close(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, pool_set_query_in_progress(); - if (REPLICATION) + if (!STREAM) { pool_extended_send_and_wait(query_context, "C", len, contents, 1, MASTER_NODE_ID, false); pool_extended_send_and_wait(query_context, "C", len, contents, -1, MASTER_NODE_ID, false); [parent: b9955cee5a01]