Fix pool_send_and_wait() to send or not to send commit/abort depending
authorTatsuo Ishii <ishii@postgresql.org>
Tue, 1 May 2012 04:08:48 +0000 (13:08 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Tue, 1 May 2012 04:08:48 +0000 (13:08 +0900)
on the transaction state on each node. It is possible that only
primary is in an explicit transaction but standby is not in it if
multi statement query has been sent.
Per bug report [pgpool-general-jp: 1049].

pool_query_context.c

index c964160bf3bb8e79a90c593363bc2b4bc6d3ceb8..bb4e313574180abc219780f680a41843d08be9c8 100644 (file)
@@ -604,7 +604,6 @@ POOL_STATUS pool_send_and_wait(POOL_QUERY_CONTEXT *query_context,
                else if (send_type > 0 && i != node_id)
                        continue;
 
-#ifdef NOT_USED
                /*
                 * If in master/slave mode, we do not send COMMIT/ABORT to
                 * slaves/standbys if it's in I(idle) state.
@@ -614,7 +613,6 @@ POOL_STATUS pool_send_and_wait(POOL_QUERY_CONTEXT *query_context,
                        pool_unset_node_to_be_sent(query_context, i);
                        continue;
                }
-#endif
 
                /*
                 * If in reset context, we send COMMIT/ABORT to nodes those