Fix kind mismatch error when DEALLOCATE statement is issued.
authorBo Peng <pengbo@sraoss.co.jp>
Thu, 13 Sep 2018 08:30:58 +0000 (17:30 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Thu, 13 Sep 2018 08:30:58 +0000 (17:30 +0900)
PREPARE should be add to pool_add_sent_message, so that EXECUTE and DEALLOCATE
can be sent to the same node as PREPARE.

See [pgpool-general: 6226] for more details.

src/protocol/CommandComplete.c

index 820e0f3ddf365a4859106d17d14fe94ff9d73532..81bd5287be1d02d0b988a6de3120cd2db1736c66 100644 (file)
@@ -65,7 +65,7 @@ CommandComplete(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend, bool
        /*
         * Handle misc process which is neccessary when query context exists.
         */
-       if (session_context->query_context != NULL && !SL_MODE)
+       if (session_context->query_context != NULL && (!SL_MODE || (SL_MODE && !pool_is_doing_extended_query_message())))
                handle_query_context(backend);
 
        /*