You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by ml...@apache.org on 2017/04/07 03:37:04 UTC

incubator-hawq git commit: Revert "HAWQ-1417. Fixed crash when ANALYZE after COPY because of invalid resource owner"

Repository: incubator-hawq
Updated Branches:
  refs/heads/master db5568488 -> 1d914de51


Revert "HAWQ-1417. Fixed crash when ANALYZE after COPY because of invalid resource owner"

This reverts commit db55684886508c3e5e0ba1b9cd603e797996109b.


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

Branch: refs/heads/master
Commit: 1d914de5141e5033f411d76c6daa49b058337082
Parents: db55684
Author: Ming LI <ml...@apache.org>
Authored: Fri Apr 7 11:36:23 2017 +0800
Committer: Ming LI <ml...@apache.org>
Committed: Fri Apr 7 11:36:23 2017 +0800

----------------------------------------------------------------------
 src/backend/commands/analyze.c | 14 --------------
 1 file changed, 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1d914de5/src/backend/commands/analyze.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index f5e8a47..65d9bd3 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -308,7 +308,6 @@ void analyzeStmt(VacuumStmt *stmt, List *relids, int preferred_seg_num)
 	ListCell				*le1 = NULL;
 	int 					successCount = 0, failCount = 0;
 	StringInfoData 			failNames;
-	ResourceOwner owner, oldOwner;
 
 	/**
 	 * Ensure that an ANALYZE is requested.
@@ -478,13 +477,6 @@ void analyzeStmt(VacuumStmt *stmt, List *relids, int preferred_seg_num)
 	}
 
 	/**
-	 * Create a resource owner to keep track of our resources even not in trasaction block 
-	 */
-	owner = ResourceOwnerCreate(CurrentResourceOwner, "analyzeStmt");
-	oldOwner = CurrentResourceOwner;
-	CurrentResourceOwner = owner;
-
-	/**
 	 *  we use preferred_seg_num as default and
 	 *  compute target_seg_num based on data size and distributed type
 	 *  if there is no preferred_seg_num.
@@ -816,12 +808,6 @@ void analyzeStmt(VacuumStmt *stmt, List *relids, int preferred_seg_num)
 	elog(failCount > 0 ? INFO : elevel, "ANALYZE completed. Success: %d, Failure: %d %s", successCount, failCount, failNames.data);
 	pfree(failNames.data);
 
-	ResourceOwnerRelease(owner,
-						 RESOURCE_RELEASE_BEFORE_LOCKS,
-						 false, true);							
-	ResourceOwnerDelete(owner);
-	CurrentResourceOwner = oldOwner;
-
 	Assert(analyzeStatementContext == CurrentMemoryContext);
 	MemoryContextSwitchTo(callerContext);
 	MemoryContextDelete(analyzeStatementContext);