1. 19 2月, 2019 1 次提交
    • J
      gpexpand generate template by pg_basebackup (#6968) · 6610b941
      Jialun 提交于
      gpexpand generate template from master by copying the master dir
      directly before, it may be unsafe. Though we lock the catalog, there
      may be some other on-disk changes. So we use pg_basebackup instead
      of native copy.
      6610b941
  2. 18 2月, 2019 3 次提交
  3. 16 2月, 2019 21 次提交
  4. 15 2月, 2019 8 次提交
    • N
      gpexpand: behave: check return code when run with duration · 510181ea
      Ning Yu 提交于
      A duration can be set on gpexpand phase2, then it can quit before
      redistributed all the tables.  There is behave tests to verify this,
      however they should check whether gpexpand quit on time.
      510181ea
    • D
      Minor codereview of gpssh-exkeys · 875c6767
      Daniel Gustafsson 提交于
      The :else clause on the for loop is superfluous as the loop doesn't
      contain any break statement. Removing it will yield the same codepath
      but makes for improved readability.
      
      This also removes an unused import (time) as well as fixes a set of
      typos.
      Reviewed-by: NJimmy Yih <jyih@pivotal.io>
      875c6767
    • P
      Fix subquery_motionHazard_walker() to accomodate more plan node types. (#6803) · eea51362
      Paul Guo 提交于
      Also refactor subquery_motionHazard_walker() to make it simpler.
      eea51362
    • N
      gpexpand: behave: check redistribute result from status table. · a7d0fb7f
      Ning Yu 提交于
      Unless cancelled with ctrl-c the gpexpand redistribution phase's return
      code is always 0, it does not indicate whether the redistribution
      succeed or not, to get this information we need to check the status from
      gpexpand.status.
      a7d0fb7f
    • N
      gpexpand: do not redistribute temp tables · 6169a2da
      Ning Yu 提交于
      Most temp tables won't live for long, there is no need to redistribute
      them.
      
      On the other hand if they are populated in gpexpand.status_detail and
      disappeared before redistribution, an error is reported to the user,
      this just causes unnecessary panic.
      6169a2da
    • T
      Recursively create partitioned indexes · f27b2a50
      Taylor Vesely 提交于
      Pull from upstream Postgres to make DefineIndex recursively create partitioned
      indexes. Instead of creating an individual IndexStmt for every partition,
      create indexes by recursing on the partition children.  This aligns index
      creation with upstream in preparation for adding INTERNAL_AUTO relationships
      between partition indexes.
      
       * The QD will now choose the same name for partition indexes as Postgres.
       * Update tests to reflect the partition index names changes.
       * The changes to DefineIndex are mostly cherry-picked from Postgres commit:
         8b08f7d4
       * transformIndexStmt and its callers have been aligned with Postgres
         REL9_4_STABLE
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      f27b2a50
    • J
      Revert eager dispatch of index creation during ALTER TABLE · fecd245a
      Jesse Zhang 提交于
      This reverts the following commits:
      commit 0ee987e64 - "Don't dispatch index creations too eagerly in ALTER TABLE."
      commit 28dd0152 - "Enable alter table column with index (#6286)"
      
      The motivation of commit 0ee987e64 is to stop eager dispatch of index creation
      during ALTER TABLE, and instead perform a single dispatch. Doing so prevents
      index name already exists errors when altering data types on indexed columns
      such as:
      
          ALTER TABLE foo ALTER COLUMN test TYPE integer;
          ERROR:  relation "foo_test_key" already exists
      
      Unfortunately, without eager dispatch of index creation the QEs can choose a
      different name for a relation than was chosen on the QD. Eager dispatch was the
      only mechanism we had to ensure a deterministic and consistent index name
      between the QE and QD in some scenarios. In the absence of another mechanism we
      must revert this commit.
      
      This commit also rolls back commit 28dd0125 to enable altering data types on
      indexed columns, which required commit 0ee987e64.
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      Co-authored-by: NTaylor Vesely <tvesely@pivotal.io>
      Co-authored-by: NDavid Krieger <dkrieger@pivotal.io>
      fecd245a
    • N
      udpifc: discard out-of-date rx-thread error · d84ef386
      Ning Yu 提交于
      UDPIFC receives data in a rx thread, errors in this thread cannot be
      raised directly, they are recorded in memory and the main thread is
      responsible to raise it at some proper time.
      
      It is possible for the rx thread to record an error after last TEARDOWN,
      technically it should be counted for last query, but there was a bug
      that the main thread raised it in next SETUP, so the new query failed
      immediately due to out-of-date errors.
      
      This is fixed by discarding any rx thread errors at beginning of SETUP.
      d84ef386
  5. 14 2月, 2019 7 次提交
    • G
      Set VARTAG_ONDISK to the appropriate value for Greenplum · 4f3e875a
      Georgios Kokolatos 提交于
      Upstream added support for multiple kinds of external toast datums (commit
      36820250). In the heart of the implementation, the representation of the
      inline portion of a short varlena was modified to store a tag describing the
      location of the datum pointed to, namely memory or disk. The tag took the place
      of the member which was describing the length of the datum pointed to. Since in
      upstream the length, for on disk datums, was always set to (VARHDRSZ_EXTERNAL +
      sizeof(struct varatt_external)), the enum for the corresponding tag was chosen
      to be exactly that, i.e. 18.
      
      In Greenplum, the exact same thing happens. However, due to historic reasons,
      there is an additional two byte padding in the struct. That representation has
      (and still is) been reflected in VARHDRSZ_EXTERNAL, which means that Greenplum
      has been storing a value for length two bytes longer than upstream.
      
      This commit updates the value of VARTAG_ONDISK to match the value that Greenplum
      has been historically storing. The other solution would have been to re-write
      the data during upgrade, but it seems unreasonably risky and evasive to do so.
      
      This commit also removes a comment that stated that Greenplum did not always set
      the length of the datum pointed to. Extensive search in the latest 5 and 4
      versions of Greenplum did not found this to be true anymore. If it were, then
      some data rewriting would have been required while upgrading Greenplum.
      
      Previous versions of Greenplum, (pre-2009) have not been checked and it should
      be considered that data from those versions will break if binary upgraded to the
      current version.
      
      Removes a GPDB_94_MERGE_FIXME.
      Co-authored-by: NDaniel Gustafsson <dgustafsson@pivotal.io>
      Reviewed-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
      4f3e875a
    • P
      Handle parameterized paths correctly when creating a join path. (#6770) · 5a808652
      Paul Guo 提交于
      After we have parameterized path since pg 9.2 and lateral (since pg9.3 although
      we do not support the full functionality), merge join path and hash join path
      need to consider that. Besides, for nestloop path, the previous code is wrong.
      
      1. It did not allow motion for paths include index (path_contains_inner_index()).
         That is wrong.  Here are two examples of index paths which allow motion.
      
      ->  Broadcast Motion 3:3  (slice1; segments: 3)  (cost=0.17..24735.67 rows=86100 width=0)
          ->  Index Only Scan using t2i on t2  (cost=0.17..21291.67 rows=28700 width=0)
      
      ->  Broadcast Motion 1:3  (slice1; segments: 1)  (cost=0.17..6205.12 rows=259 width=8)
          ->  Index Scan using t2i on t2  (cost=0.17..6201.67 rows=29 width=8)
              Index Cond: (4 = a)
      
      2. The inner path and outer path might require upper nodes for parameterized
         paths so current code code
           bms_overlap(inner_req_outer, outer_path->parent->relids)
         is definitely not sufficient, besides, outer_path could have paramterized
         paths also.
      
      For nestloop join, case 1 is covered by the test case added in join_gp.
      For case 2, the test case in join.sql (although ignored) in this patch
      actually partially tested.
      
      Note the change in this patch is conservative. In theory, we could refer
      subplan code to allow broadcast for base rel if needed (for this solution
      no motion is needed), but that needs much effort and does not seem
      to be deserved given we will probably refactor related code for the
      lateral support in the near future.
      5a808652
    • R
      Set correct nullable_relids for get_eclass_for_sort_expr. · 0dd41248
      Richard Guo 提交于
      This removes several places of GPDB_94_MERGE_FIXME.
      0dd41248
    • R
      Do not consider outer-join quals for non_eq_clauses from the beginning. · e4b9e3e4
      Richard Guo 提交于
      Currently we conduct non-equivalent class deduction only from quals of
      inner join. This patch avoids adding outer join quals to non_eq_clauses
      from the beginning.
      Reviewed-by: NMelanie Plageman <mplageman@pivotal.io>
      e4b9e3e4
    • S
    • S
      Pull libsigar from GCS for Centos{6,7} (#6946) · 91a9588e
      Sambitesh Dash 提交于
      We now pull down the libsigar artifacts (.targz) from GCS for Centos
      instead of ivy.
      
      After removing all the ivy dependencies for Centos{6,7}, `make
      sync_tools` no longer creates {GPDB_SRC}/gpAux/ext/rhel{6,7}_x86_64
      in the concourse instance. This commit creates the necessary directories
      for Centos{6,7} platform.
      Co-authored-by: NNandish Jayaram <njayaram@pivotal.io>
      Co-authored-by: NSambitesh Dash <sdash@pivotal.io>
      Signed-off-by: NSambitesh Dash <sdash@pivotal.io>
      91a9588e
    • K
      Remove lib{com_err,crypto,ssl}.so from centos gpdb6 binaries · 548f179d
      Karen Huddleston 提交于
      These should have been removed when the dependencies were shifted from
      Ivy to the operating system in commit
      07175e06, but we missed these.
      
      Note that that the copylibs target was copying the libraries from the
      system into gpdb binaries, but that was wrong so we stopped it.
      Co-authored-by: NKaren Huddleston <khuddleston@pivotal.io>
      Co-authored-by: NAmil Khanzada <akhanzada@pivotal.io>
      548f179d