You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by huor <gi...@git.apache.org> on 2016/02/16 09:06:06 UTC

[GitHub] incubator-hawq pull request: HAWQ-412. Allocate query resource for...

GitHub user huor opened a pull request:

    https://github.com/apache/incubator-hawq/pull/345

    HAWQ-412. Allocate query resource for multiple EXECUTIONs in explicit and implicit prepared statement

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/huor/incubator-hawq huor_madlib

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-hawq/pull/345.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #345
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-412. Allocate query resource for...

Posted by zhangh43 <gi...@git.apache.org>.
Github user zhangh43 commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/345#issuecomment-185047147
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-412. Allocate query resource for...

Posted by huor <gi...@git.apache.org>.
Github user huor closed the pull request at:

    https://github.com/apache/incubator-hawq/pull/345


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-412. Allocate query resource for...

Posted by wangzw <gi...@git.apache.org>.
Github user wangzw commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/345#issuecomment-185086063
  
    +1 if memory context issue is fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-412. Allocate query resource for...

Posted by huor <gi...@git.apache.org>.
Github user huor commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/345#issuecomment-185519205
  
    Good idea. For a quick fix, we can use CacheMemoryContext which is 8M at maximum.
    
    We are investigating on plan context for different queries including:
    1) SPI query
    2) Named prepared statement
    3) Unnamed prepared statement
    After that, we can use more appropriate memory context for prepared plan accordingly. This will be a separate improvement.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-412. Allocate query resource for...

Posted by wangzw <gi...@git.apache.org>.
Github user wangzw commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/345#discussion_r53130491
  
    --- Diff: src/backend/cdb/cdbdatalocality.c ---
    @@ -3967,6 +4001,18 @@ calculate_planner_segment_num(Query *query, QueryResourceLife resourceLife,
     
     	init_datalocality_context(&context);
     
    +	/*
    +	 * Initialize QueryResourceParameters in QD
    +	 *
    +	 * We use TopMemoryContext here so that the QueryResourceParameter
    +	 * can be available in the session. Thus, it can be used in multiple
    +	 * "EXECUTION"s of the prepared statement (i.e., "PREPARE", "BIND",
    +	 * "EXECUTION"
    +	 */
    +	MemoryContext oldcontext = MemoryContextSwitchTo(TopMemoryContext);
    --- End diff --
    
    TopMemoryContext has only 8kB. You will get trouble to store information in it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---