hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hubertzh...@apache.org
Subject incubator-hawq git commit: HAWQ-629. Insert into table select generate_series free resource too early.
Date Thu, 07 Apr 2016 01:26:45 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 19604066b -> b30cd79d4


HAWQ-629. Insert into table select generate_series free resource too early.


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

Branch: refs/heads/master
Commit: b30cd79d496d676a271e088e22f646d960e93177
Parents: 1960406
Author: hzhang2 <zhanghuan929@163.com>
Authored: Thu Apr 7 09:21:14 2016 +0800
Committer: hzhang2 <zhanghuan929@163.com>
Committed: Thu Apr 7 09:25:46 2016 +0800

----------------------------------------------------------------------
 src/backend/executor/execMain.c | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b30cd79d/src/backend/executor/execMain.c
----------------------------------------------------------------------
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index cc030be..58d8d9b 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -1376,6 +1376,11 @@ ExecutorEnd(QueryDesc *queryDesc)
 		 */
 		FreeExecutorState(estate);
 
+		/* Cleanup the global resource reference for spi/function resource inheritate. */
+		if (Gp_role == GP_ROLE_DISPATCH) {
+		  AutoFreeResource(queryDesc->resource);
+		  queryDesc->resource = NULL;
+		}
 		PG_RE_THROW();
 	}
 	PG_END_TRY();


Mime
View raw message