pgpool2.git / summary / log / commit / refs
commit 8e984d1a78e9837d1a253fc050bd984dbbb835ff
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Mon Jul 31 08:29:27 2017 +0000
Fix starting unnecessary transaction when SET command is issued.
In streaming replication mode, there's no point to start internal
transaction when SET command is issued. The existing behavior is
harmless but waste of CPU cycle.
src/protocol/pool_proto_modules.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/protocol/pool_proto_modules.c b/src/protocol/pool_proto_modules.c
index 8c504584b..a07e1823f 100644
--- a/src/protocol/pool_proto_modules.c
+++ b/src/protocol/pool_proto_modules.c
@@ -522,7 +522,7 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend,
* - statement is INSERT
* - either "INSERT LOCK" comment exists or insert_lock directive specified
*/
- if (!RAW_MODE)
+ if (!RAW_MODE && !STREAM)
{
/*
* If there's only one node to send the command, there's no
[parent: 7a47b01c3f01]