pgpool2.git / summary / log / commit / refs
commit 2840a90d731dab8759e496cf96aacc456c824026
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Mon Jul 29 14:52:41 2013 +0000
Fix bug in parsing prepared statements with transaction handling in replication mode reported in [pgpool-general: 1877].
Parse() automatically starts a transaction for non SELEC query to keep
consistency among nodes in replication mode. But it does not set
allow_close_transaction variable. If wrong query comes in, the
transaction goes into an abort state but pgpool does not close the
transaction. Thus next query causes error because the transaction is
still in abort status.
pool_proto_modules.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pool_proto_modules.c b/pool_proto_modules.c
index 556baca84..186b48bac 100644
--- a/pool_proto_modules.c
+++ b/pool_proto_modules.c
@@ -1132,7 +1132,10 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend,
}
if (is_strict_query(query_context->parse_tree))
+ {
start_internal_transaction(frontend, backend, query_context->parse_tree);
+ allow_close_transaction = 1;
+ }
if (insert_stmt_with_lock)
{
[parent: 5a0293721d53]