Do not send a query for checking insert lock in non replication mode with extended...
authorTatsuo Ishii <ishii@postgresql.org>
Sun, 21 Jun 2015 09:51:34 +0000 (18:51 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sun, 21 Jun 2015 09:54:16 +0000 (18:54 +0900)
This unnecessary code was there since day 0.

pool_proto_modules.c

index fbced6f7ca1ca514b5b5228be127878bfdd8c6fc..3c41c581710ff79e9d026e86a391d9be23c9c01a 100644 (file)
@@ -964,7 +964,11 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend,
 
                node = (Node *) lfirst(list_head(parse_tree_list));
 
-               insert_stmt_with_lock = need_insert_lock(backend, stmt, node);
+               /* If replication mode, check to see what kind of insert lock is
+                * neccessary.
+                */
+               if (REPLICATION)
+                       insert_stmt_with_lock = need_insert_lock(backend, stmt, node);
 
                /*
                 * Start query context