pgpool2.git / summary / log / commit / refs
commit 7fa21c4e34d8b8e80312688b3795857be04fa7c7
Author: Tatsuo Ishii <ishii at sraoss.co.jp>
Date: Tue Feb 17 09:50:52 2009 +0000
Do not start internal transaction if CREATE INDEX CONCURRENTLY
pool_process_query.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/pool_process_query.c b/pool_process_query.c
index 72b713eef..7aba34cfc 100644
--- a/pool_process_query.c
+++ b/pool_process_query.c
@@ -3955,7 +3955,19 @@ static bool is_internal_transaction_needed(Node *node)
T_AlterTSConfigurationStmt
};
- return bsearch(&nodeTag(node), nodemap, sizeof(nodemap)/sizeof(nodemap[0]), sizeof(NodeTag), compare) != NULL;
+ if (bsearch(&nodeTag(node), nodemap, sizeof(nodemap)/sizeof(nodemap[0]), sizeof(NodeTag), compare) != NULL)
+ {
+ /*
+ * chek CREATE INDEX CONCURRENTLY. If so, do not start transaction
+ */
+ if (IsA(node, IndexStmt))
+ {
+ if (((IndexStmt *)node)->concurrent)
+ return false;
+ }
+ return true;
+ }
+ return false;
}
POOL_STATUS start_internal_transaction(POOL_CONNECTION_POOL *backend, Node *node)
[parent: 08e66722b038]