1. 05 9月, 2017 1 次提交
    • N
      Simplify tuple serialization in Motion nodes. · 11e4aa66
      Ning Yu 提交于
      * Simplify tuple serialization in Motion nodes.
      
      There is a fast-path for tuples that contain no toasted attributes,
      which writes the raw tuple almost as is. However, the slow path is
      significantly more complicated, calling each attribute's binary
      send/receive functions (although there's a fast-path for a few
      built-in datatypes). I don't see any need for calling I/O functions
      here. We can just write the raw Datum on the wire. If that works
      for tuples with no toasted attributes, it should work for all tuples,
      if we just detoast any toasted attributes first.
      
      This makes the code a lot simpler, and also fixes a bug with data
      types that don't have a binary send/receive routines. We used to
      call the regular (text) I/O functions in that case, but didn't handle
      the resulting cstring correctly.
      
      Diagnosis and test case by Foyzur Rahman.
      Signed-off-by: NHaisheng Yuan <hyuan@pivotal.io>
      Signed-off-by: NNing Yu <nyu@pivotal.io>
      11e4aa66
  2. 03 9月, 2017 1 次提交
    • H
      Record dependency for external protocol in an extension. · 79202d91
      Heikki Linnakangas 提交于
      When extensions were introduced in PostgreSQL, a call to
      recordDependencyOnCurrentExtension() was added in the creation codepath
      of all the object types. However, external protocols is a GPDB-specific
      object type, and we missed making that change there.
      
      Fixes github issue #2942.
      79202d91
  3. 02 9月, 2017 10 次提交
    • H
      Run pgindent over PXF code. · 35e28c51
      Heikki Linnakangas 提交于
      Backport to 5X_STABLE, in order to make backporting future fixes easier.
      35e28c51
    • B
      Dont pullup correlated subqueries with limit/offset clause · 34521645
      Bhuvnesh Chaudhary 提交于
      Queries in which there is a IN clause on top of a correlated subquery
      containing limit/offset clause, planner tries to identify if the IN clause can
      be converted to a join in convert_IN_to_join() and creates a RTE
      for the join if its possible and does not consider limit/offset clause
      while making a decision. However, later in pull_up_subqueries(),
      check enforced by is_simple_subquery causes the subquery containing limit/offset
      clauses to be not pulled up. This inconsistency causes a plan to be
      generated with a param, however, with no corresponding subplan.
      
      The patch fixes the issues by adding the relevant checks in
      convert_IN_to_join() to identify if the subquery is
      correlated and contains limit/offset clause, in such cases the sublink
      will not be converted to a join and a plan with subplan will be created.
      34521645
    • J
      Bump ORCA version to 2.41.0 · 2ff02208
      Jemish Patel 提交于
      Signed-off-by: NOmer Arap <oarap@pivotal.io>
      Signed-off-by: NDhanashree Kashid <dkashid@pivotal.io>
      (cherry picked from commit 21b7f934)
      2ff02208
    • D
      Don't send PartConstraint expression if rel has no indices · 48e51721
      Dhanashree Kashid 提交于
      While gathering metadata information about a partitioned relation, the
      relcache translator in GPDB constructs and sends partition
      constraints in `CMDPartConstraintGPDB` object.
      CMDPartConstraintGPDB contains following:
      1. m_pdrgpulDefaultParts = List of partition levels that have default
                                 partitions
      2. m_fUnbounded          = indicate if the constraint is unbounded
      3. m_pdxln               = Part Constraint expression
      
      When you have more partitioning levels, the part constraint expression
      can grow large and we end up spending significant amount of time in
      translating this expression to DXL format.
      For instance, for the following query, relcache translator spends
      `18895.444000 ms` in fetching the metadata information on debug build:
      ```
      DROP TABLE IF EXISTS date_parts;
      CREATE TABLE DATE_PARTS (id int, year int, month int, day int, region text)
      DISTRIBUTED BY (id) PARTITION BY RANGE (year) SUBPARTITION BY LIST
      (month) SUBPARTITION TEMPLATE ( SUBPARTITION Q1 VALUES (1, 2, 3),
      SUBPARTITION Q2 VALUES (4 ,5 ,6), SUBPARTITION Q3 VALUES (7, 8, 9),
      SUBPARTITION Q4 VALUES (10, 11, 12), DEFAULT SUBPARTITION other_months )
      SUBPARTITION BY RANGE(day) SUBPARTITION TEMPLATE ( START (1) END (31)
      EVERY (10), DEFAULT SUBPARTITION other_days) ( START (2002) END (2012)
      EVERY (1), DEFAULT PARTITION outlying_years );
      
      INSERT INTO date_parts SELECT i, EXTRACT(year FROM dt), EXTRACT(month
      FROM dt), EXTRACT(day FROM dt), NULL FROM (SELECT i, '2002-01-01'::DATE
      + i * INTERVAL '1 day' day AS dt FROM GENERATE_SERIES(1, 3650) AS i) AS
      t;
      
      EXPLAIN SELECT * FROM date_parts WHERE month BETWEEN 1 AND 4;
      ```
      
      At ORCA end, however, we do not use this part constraints expression
      unless the relation has indices built on it.  This is evident from
      CTranslatorDXLToExpr.cpp + L565 (`CTranslatorDXLToExpr::PexprLogicalGet`).
      Hence we do not need to send the PartConstraint expression from GPDB
      Recache Translator since:
      A. It will not be consumed if there are no indices
      B. The DXL translation is expensive.
      
      This commit fixes the Relcache Translator to send the Partition Constraint
      Expression to ORCA only in the cases listed below :
      
      	IsPartTable     Index 	DefaultParts   ShouldSendPartConstraint
      	NO		-	-	       -
      	YES		YES	YES	       YES
      	YES		NO 	NO	       NO
      	YES		NO 	YES            YES (but only default levels info)
      
      After fix the metadata fetch and translation time is reduced to `87.828000ms`.
      
      We also need changes in ORCA ParseHandler since we will be sending the part
      constraint expression in some cases only.
      
      [Ref #149769559]
      Signed-off-by: NOmer Arap <oarap@pivotal.io>
      (cherry picked from commit 752e06f6)
      48e51721
    • S
      README correction · e0e5cbf3
      Shivram Mani 提交于
      e0e5cbf3
    • S
      README updates for PXF build/setup instructions (#3135) · baee6ca9
      Shivram Mani 提交于
      * README updates for PXF setup instructions
      
      * PXF README updates for PXF setup instructions
      
      * test update
      
      * README updates for PXF setup instructions
      
      * PXF README updates for PXF setup instructions
      
      * note on curl depedancy
      
      * minor update
      baee6ca9
    • L
    • D
      Docs: Adding/updating short descriptions and landing pages. (#2980) · 34b65ee2
      David Yozie 提交于
      * updating security guide landing page and main sections to use consistent short descriptions.
      
      * making security title consistent with others
      
      * updating best practices guide landing page and main sections to use consistent short descriptions.
      
      * updating utility guide main sections to use consistent short descriptions.
      34b65ee2
    • L
      1ad14abb
    • L
      docs - resource mgmt topic restructure, resource group initial "using" content (#3006) · 5ff74301
      Lisa Owen 提交于
      * docs - resource mgmt restructure, resgroup initial content
      
      * incorporate edits from david; some reorg
      
      * add memory allotment diagram
      
      * minor edit
      
      * make resource group experimental note a warning
      
      * incorporate edits from simon
      
      * update base color of resource group graphic
      
      * add missing ;
      5ff74301
  4. 01 9月, 2017 28 次提交