1. 14 3月, 2019 18 次提交
  2. 13 3月, 2019 21 次提交
    • J
      Fix assert failure for copy to partition table (#7132) · 5425da14
      Jinbao Chen 提交于
      
      We have an assert failure for copy to partition table if root and child relation
      have different attno. The root cause is that 'reconstructTupleValues'
      has a wrong value of newNumAttrs lenth.
      5425da14
    • B
      Add the --enable-debug-extensions option to the gpdb_master pipeline · 0e5ce82c
      Bob Bao 提交于
        * Add configure_flags_with_extensions to the pipeline template file
        * regenerate the gpdb_master pipeline and use fly to set it up.
      Co-authored-by: NBob Bao <bbao@pivotal.io>
      Co-authored-by: NNing Fu <nfu@pivotal.io>
      0e5ce82c
    • Z
      Correctly expand writable external table · 2c9cd895
      Zhang Shujie 提交于
      Writable external table has an entry in gp_distribution_policy
      so it has numsegments field. Previous code skips any external
      tables so that their numsegments fields are not updated. This
      commit fixes this by:
        1. add a column in status_detail table to record whether the
            table is writable external and invokes correct SQL to expand
            such tables.
        2. Support `Alter external table <tab> expand table` for writable
            external tables.
      
      Co-authored-by: Zhenghua Lyu zlv@pivotal.io
      2c9cd895
    • G
      Set the backoff weight avoiding catalog lookups when not in transaction · 797646fc
      Georgios Kokolatos 提交于
      Upstream commit <568d4138> introduced a proper MVCC model for catalog
      lookups. This change means that catalog lookups must be avoided if not in a
      proper transaction state. In PortalSetBackoffWeight(), a check was validating if
      the call was in a transaction and in case of failure no catalog look ups were
      perfomed nor a backend entry was initialized.
      
      This commit initializes a backend entry in all cases with a proper weight. No
      catalogue lookups are performed outside of a transaction state.
      
      Also it tidies up a bit the interface for the initialisation of backoff entries
      as it removes the responsibility for calculating the backoff weight from the
      caller.
      
      Removes 94_MERGE_FIXME.
      Co-authored-by: NJimmy Yih <jyih@pivotal.io>
      Reviewed-by: NAshwin Agrawal <aagrawal@pivotal.io>
      Reviewed-by: NDaniel Gustafsson <dgustafsson@pivotal.io>
      Reviewed-by: NGang Xiong <gxiong@pivotal.io>
      797646fc
    • J
      Add check on exchange partion (#7049) · 8f641583
      Jinbao Chen 提交于
      
      On sql "alter table parttab exchange partition for (1) with table y",
      we checked if the table has same columns with the partion table. But
      on sql "alter table parttab alter partition for (1) exchange partition
      for (1) with table x", we forgot the check. Add the check back.
      8f641583
    • N
      gpexpand: behave: cleanup use of the database argument · bbfc6194
      Ning Yu 提交于
      The database argument of the Gpexpand() constructor of the gpexpand
      behave test was retired in 1c262c6e, but
      a recently merged PR still contains use of this argument.
      bbfc6194
    • T
      Build necessary extensions for release (#7057) · 35a71407
      Tingfang Bao 提交于
      * Build necessary extensions for release
      
      * Add new  '--enable-debug-extensions' configure option, if provide the option,
        the extensions include:
      
            gp_distribution_policy
            gp_internal_tools
            gp_sparse_vector
            gp_replica_check
            gp_inject_fault
            gp_debug_numsegments
      
      * Rename configure_flags to configure_flags_with_extensions
      
        The configure_flags_with_extensions SHOULD BE set to
      
            configure_flags_with_extensions: "--enable-cassert --enable-debug-extensions"
      
          in these secrets files
      
             secrets/gpdb_master-ci-secrets.dev.yml
             secrets/gpdb_master-ci-secrets.prod.yml
      Co-authored-by: NBob Bao <bbao@pivotal.io>
      Co-authored-by: NNing Fu <nfu@pivotal.io>
      35a71407
    • M
      Fixed pip/python report error after `source greenplum_path.sh` · 42c3cd3a
      Ming Li 提交于
      If no python in $GPHOME/ext/python/bin/python, $PYTHONHOME will be set
      to empty string, which make python env wrong.
      Signed-off-by: NTingfang Bao <bbao@pivotal.io>
      42c3cd3a
    • N
      Ensure partial tables are dropped after table expansion tests · 611f0248
      Ning Yu 提交于
      We need to do a cluster expansion which will check if there are partial
      tables, we need to drop the partial tables to keep the cluster expansion
      run correctly.
      611f0248
    • J
      gpexpand minor fix · a8cdedaa
      Jialun Du 提交于
      - Change rollback complete message for online expand needn't restart
      - fsync the status file write operation to make sure that the data
        has been sync to disk
      a8cdedaa
    • Z
      Move test partial_table to another test group to avoid deadlock · d9606d18
      Zhenghua Lyu 提交于
      Previously, test cases `partial_table` and `subselect_gp2` are
      in the same test group so that they might be running concurrently.
      
      `partital_table` contains a statement: `update gp_distribution_policy`,
      `subselect_gp2` contains a statement: `VACUUM FULL pg_authid`. These
      two statements may lead to local deadlock on QD when running concurrently
      if GDD is disabled.
      
      If GDD is disabled,
      
        `update gp_distribution_policy`'s lock-acquire:
          1. at parsing stage, lock `gp_distribution_policy` in Exclusive Mode
            2. later when it needs to check authentication, lock `pg_authid` in
                 AccessShare Mode
      
        `VACUUM FULL pg_authid`'s lock-acquire:
          1. lock pg_authid in Access Exclusive Mode
            2. later when rebuilding heap, it might delete some dependencies,
                 this will do GpPolicyRemove, which locks `gp_distribution_policy`
      	        in RowExclusive Mode
      
      So there is a potential local deadlock.
      d9606d18
    • J
      Check permission first to avoid access unavailable field. · 4f0f9b87
      Jialun Du 提交于
      If the target is not a table, it must error out. So it's better
      to do permission check first, or the logic may access some fields
      which is null-able for non-table object and cause crash.
      4f0f9b87
    • N
      Tolerant misplaced tuples during data expansion · 28026210
      Ning Yu 提交于
      Add tests to ensure that a table can be expanded correctly even if it
      contains misplaced tuples.
      28026210
    • J
      gpexpand: fix fallback failures in phase 1 · 4034ce6c
      Jialun Du 提交于
      Modify gpexpand phase 1, so it can continue to retry the failed
      work by re-run gpexpand, if it fails after releasing the catalog
      lock.
      
      The current progress of gpexpand segment preparation is
      1. create template base on master
      2. lock catalog
      3. build and start new segments
      4. update gp_segment_configuration (then new transaction will see new nodes)
      5. unlock catalog
      6. create schema and table for phase2(data redistribution)
      
      If it fails before step 5, it can roll back to original state by
      running gpexpand with -r. But if it fails after step5, it can not
      roll back. Because new database/table/schema may be created after
      unlocking the catalog. And new data may be inserted into new
      segments.
      
      If it fails in step 6 now, DBA can do nothing. They can not roll back
      and also can not conitnue to retry the failing work in step 6 without
      complex manual intervention. So we change the behaviour here, if
      gpexpand finds that the last expansion didn't complete successfully
      and can not roll back, it will cleanup the schemas and tables built
      in step 6 last time and retry the step 6.
      4034ce6c
    • T
      Add a sanity check for numsegments properity · 521be451
      Tang Pengzhou 提交于
      I noticed that we haven't a sanity check for the correctness of
      "numsegments" of a table, the numsegments might be larger than
      the size of cluster, eg, table is expanded after a global
      transaction is started and then the table is accessed in that
      transaction or gp_distribution_policy is corrupt in some way,
      Dispatcher or interconnect cannot handle such case, so add a
      sanity check to error it out.
      
      This sanity check is skipped in UTILITY mode.  getgpsegementcount()
      returns -1 in UTILITY mode which will always make numsegments sanity
      check failed, so skip it for UTILITY mode.
      521be451
    • D
    • D
      Rename isolationtest suite · 2a374cb5
      Daniel Gustafsson 提交于
      Spell out VACUUM ANALYZE rather than using a pointless, and silly,
      shortening. No functional change.
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      Reviewed-by: NJimmy Yih <jyih@pivotal.io>
      2a374cb5
    • L
      cc3bcc0b
    • J
      gpinitstandby: rename -F to -S and document it · d6338173
      Jacob Champion 提交于
      This reintroduces commit ba3eb5b4, which was reverted in 659f0ee5.
      
      After the WALrep changes, the previous -F (filespace) option was
      co-opted to be the new standby data directory option. This isn't a
      particularly obvious association.
      
      Change the option to -S. (-D would have been better, but that's already
      in use as a short alias for --debug.) Also document this option in the
      official gpinitstandby help.
      d6338173
    • J
      gpinitstandby: guide the user on single-host systems · 650304ee
      Jacob Champion 提交于
      This reintroduces commit c9c3c351, which was reverted in 659f0ee5.
      
      When a standby is initialized on the same host as the original master,
      remind the user that the data directory and port need to be explicitly
      set.
      650304ee
    • J
      gparray: remove unused createTemplate() · a4c61131
      Jacob Champion 提交于
      Commit 6610b941 removed the use of createTemplate() from gpexpand.
      There are no more callers, and as that commit pointed out, the
      implementation is unsafe. We can also get rid of DiskUsage and
      LocalDirCopy.
      Co-authored-by: NJamie McAtamney <jmcatamney@pivotal.io>
      a4c61131
  3. 12 3月, 2019 1 次提交