hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject incubator-hawq git commit: HAWQ-1195. Fixed error "Two or more external tables use the same error table "
Date Mon, 12 Dec 2016 02:38:58 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 093330fe6 -> fad1b9050


HAWQ-1195. Fixed error "Two or more external tables use the same error table "

The error table should be works same as normal user table on hdfs, which support multiple
INSERTs.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/fad1b905
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/fad1b905
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/fad1b905

Branch: refs/heads/master
Commit: fad1b90505b3112d480cf1635f16edd8a957cc85
Parents: 093330f
Author: Ming LI <mli@apache.org>
Authored: Tue Dec 6 17:17:50 2016 +0800
Committer: Ming LI <mli@apache.org>
Committed: Mon Dec 12 10:38:17 2016 +0800

----------------------------------------------------------------------
 src/backend/executor/execMain.c | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/fad1b905/src/backend/executor/execMain.c
----------------------------------------------------------------------
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 578b9e8..27c1b15 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -258,25 +258,6 @@ SetupSegnoForErrorTable(Node *node, QueryCxtWalkerCxt *cxt)
 			if (!OidIsValid(scan->fmterrtbl))
 				return false;
 
-			/*
-			 * check if two external table use the same error table in a statement
-			 */
-			if (info->errTblOid)
-			{
-				ListCell	   *c;
-				Oid				errtbloid;
-				foreach(c, info->errTblOid)
-				{
-					errtbloid = lfirst_oid(c);
-					if (errtbloid == scan->fmterrtbl)
-					{
-						Relation rel = heap_open(scan->fmterrtbl, AccessShareLock);
-						elog(ERROR, "Two or more external tables use the same error table \"%s\" in a statement",
-								RelationGetRelationName(rel));
-					}
-				}
-			}
-
             /*
              * Prepare error table for insert.
              */
@@ -285,12 +266,12 @@ SetupSegnoForErrorTable(Node *node, QueryCxtWalkerCxt *cxt)
             scan->errAosegnos = errSegnos;
             info->errTblOid = lcons_oid(scan->fmterrtbl, info->errTblOid);
 
-            Relation errRel = heap_open(scan->fmterrtbl, RowExclusiveLock);
+            Relation errRel = heap_open(scan->fmterrtbl, NoLock);
             CreateAppendOnlyParquetSegFileForRelationOnMaster(errRel, errSegnos);
             prepareDispatchedCatalogSingleRelation(info, scan->fmterrtbl, TRUE, errSegnos);
             scan->err_aosegfileinfos = fetchSegFileInfos(scan->fmterrtbl, errSegnos);
 
-            heap_close(errRel, RowExclusiveLock);
+            heap_close(errRel, NoLock);
 
             return false;
 		default:


Mime
View raw message