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:34 +0000 (18:54 +0900)
This unnecessary code was there since day 0.

pool_proto_modules.c

index bcb5041dfb8342f97debe6f58b483cfddbd5abb4..113aa3a86167159c2184ef4a49fef8e4f3deedb5 100644 (file)
@@ -733,7 +733,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