Return-Path: X-Original-To: apmail-hawq-commits-archive@minotaur.apache.org Delivered-To: apmail-hawq-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 420E919F74 for ; Wed, 6 Apr 2016 03:06:53 +0000 (UTC) Received: (qmail 72135 invoked by uid 500); 6 Apr 2016 03:06:53 -0000 Delivered-To: apmail-hawq-commits-archive@hawq.apache.org Received: (qmail 72088 invoked by uid 500); 6 Apr 2016 03:06:53 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 72079 invoked by uid 99); 6 Apr 2016 03:06:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 03:06:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id A09ACC0295 for ; Wed, 6 Apr 2016 03:06:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 1G5N6w3Acr0u for ; Wed, 6 Apr 2016 03:06:51 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 73BF85F2C3 for ; Wed, 6 Apr 2016 03:06:51 +0000 (UTC) Received: (qmail 72076 invoked by uid 99); 6 Apr 2016 03:06:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 03:06:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D267CDFD5B; Wed, 6 Apr 2016 03:06:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hubertzhang@apache.org To: commits@hawq.incubator.apache.org Message-Id: <3099fab883cc49b69cc8ce8a4cfc6e0e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-hawq git commit: HAWQ-629. Insert into table select generate_series free resource too early. Date: Wed, 6 Apr 2016 03:06:50 +0000 (UTC) Repository: incubator-hawq Updated Branches: refs/heads/master 1fbdf8b9a -> 0aa695293 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/0aa69529 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0aa69529 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0aa69529 Branch: refs/heads/master Commit: 0aa6952930e6f7d155624947dbb612e1516b0a00 Parents: 1fbdf8b Author: hzhang2 Authored: Wed Apr 6 10:59:15 2016 +0800 Committer: hzhang2 Committed: Wed Apr 6 11:00:07 2016 +0800 ---------------------------------------------------------------------- src/backend/executor/execMain.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0aa69529/src/backend/executor/execMain.c ---------------------------------------------------------------------- diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 6fa5cd2..cc030be 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -1306,12 +1306,6 @@ ExecutorEnd(QueryDesc *queryDesc) /* sanity checks */ Assert(queryDesc != NULL); - /* Cleanup the global resource reference for spi/function resource inheritate. */ - if ( Gp_role == GP_ROLE_DISPATCH ) { - AutoFreeResource(queryDesc->resource); - queryDesc->resource = NULL; - } - estate = queryDesc->estate; Assert(estate != NULL); @@ -1386,6 +1380,12 @@ ExecutorEnd(QueryDesc *queryDesc) } PG_END_TRY(); + /* Cleanup the global resource reference for spi/function resource inheritate. */ + if ( Gp_role == GP_ROLE_DISPATCH ) { + AutoFreeResource(queryDesc->resource); + queryDesc->resource = NULL; + } + /* * If normal termination, let each operator clean itself up. * Otherwise don't risk it... an error might have left some