1. 16 8月, 2019 3 次提交
    • S
      Bump ORCA version · 4bf1d27f
      Sambitesh Dash 提交于
      4bf1d27f
    • J
      set_config_by_name(): dispatch all values correctly · c891c8ac
      Jacob Champion 提交于
      The dispatch code for set_config() incorrectly quoted the GUC value by
      surrounding it in single quotes. Not only does this not handle more
      "interesting" values containing embedded single quotes, but GUCs with
      the GUC_LIST_QUOTE flag, such as search_path, ended up with different
      values on the segments compared to the master. For example,
      
          SELECT set_config('search_path', 'my_schema,public', false);
      
      was dispatched as
      
          SET search_path TO 'my_schema,public';
      
      instead of
      
          SET search_path TO my_schema,public;
      
      The two are not equivalent; the latter correctly sets search_path to a
      list of two elements, "my_schema" and "public", whereas the former sets
      search_path to a list containing a single "my_schema,public" element.
      
      Rather than trying to parse apart the list value, dispatch the
      set_config() call to the QEs as well. This lets us pass through the
      (quoted) arguments directly and guarantees that we run the same code in
      both places.
      Co-authored-by: NShoaib Lari <slari@pivotal.io>
      c891c8ac
    • J
      set_config_by_name(): fix whitespace · b33db557
      Jacob Champion 提交于
      ...as suggested by our master version of pgindent.
      b33db557
  2. 15 8月, 2019 5 次提交
    • R
      Make Multi-DQA on subquery work. · 84707337
      Richard Guo 提交于
      When generating plan for multi-DQA, we need to build a coplan on base of
      the shared scan for each distinct DQA, and then join the coplans back
      together. And while building the coplan for each DQA, the arrays for
      RelOptInfo and RangeTblEntry for the PlannerInfo would be rebuild and
      the original arrays would have been replaced. So, for the DQA other than
      the first one, we need to restore the arrays to what they are like for
      the original shared scan plan before building coplan for it.
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      Reviewed-by: Npengzhout <ptang@pivotal.io>
      84707337
    • W
      GPDB GUC dispatching flag refactor · 750647bb
      Weinan WANG 提交于
      
      So far, we use to dispatch a guc when creating gang if its flag contains
      GUC_GPDB_ADDOPT. It has some drawbacks.
      1. This flag left a lots footprint in guc.c, when we diff upstream code.
      2. It is easy to forget marking it when new guc introduce.
      
      To deal with these issues, and also this PR is the first step of
      [PR7184](https://github.com/greenplum-db/gpdb/pull/7184).
      
      Rename GUC_GPDB_ADDOPT flag as GUC_GPDB_NEED_SYNC, as well as, declare a new
      guc flag named GUC_GPDB_NO_SYNC. For the predefine guc in guc.c and guc_gp.c
      must explicitly assign one of these two flags.
      For custom guc, give a default flag, GUC_GPDB_NO_SYNC, if it does not
      explicit set.
      
      Instead of the direct set flag in guc.c, we define two array, sync_guc_names_array
      and unsync_guc_names_array.To recode guc names into and automatically
      assign flag when the guc object is built in Postgres. Hence, we can
      reduce footprint when diffing with upstream guc.c
      
      Idea from Heikki Linnakangas <hlinnakangas@pivotal.io>
      Idea from Hubert Zhang <hzhang@pivotal.io>
      750647bb
    • X
      Fix interconnect retransmission period · 060f6414
      xiong-gang 提交于
      For a query like:
      SELECT ... ORDER BY key LIMIT n;
      
      When the query running time is longer than UNACK_QUEUE_RING_LENGTH * TIMER_SPAN
      (By default is 10 seconds), and the first tuple send from OrderBy node to QD is
      not acknowledged, function putIntoUnackQueueRing will calculate an
      inappropriate retransmission period, which is UNACK_QUEUE_RING_LENGTH *
      TIMER_SPAN.
      060f6414
    • I
      synchronize the help file with the documentation · 92df954c
      Ivan Novick 提交于
      and add missing options
      92df954c
    • B
      Disallow ALTER TABLE ADD CONSTRAINT USING INDEX on a partition root · ed50049c
      Bhuvnesh Chaudhary 提交于
      ADD CONSTRAINT USING INDEX is a new feature which didn't existing for 4
      or 5 branches. This is taken from upstream commit eb7ed3f3. With
      partition tables, the changes are not propagated to the leaf partitions
      if the operation is done on the root table, thus disallowed currently.
      
      This introduces rel_is_interior_partition to determine if a relation is
      an interior node in a partition hierarchy.
      Co-authored-by: NSoumyadeep Chakraborty <sochakraborty@pivotal.io>
      ed50049c
  3. 14 8月, 2019 5 次提交
    • S
      Tear out movedb_failure_callback · 3adad712
      Soumyadeep Chakraborty 提交于
      The movedb_failure_callback existed to ensure that if copydir fails
      inside movedb, it would clean up the destination directory. We
      introduced the pending deletes mechanism to ensure cleanup throughout
      2PC in b0208894.
      
      These are two conflicting mechanisms, especially evident in the
      following scenario:
      1. An error occurs after the ScheduleDbDirDelete on the target
      tablespace directory and inside the ENSURE block.
      2. movedb_failure_callback() is invoked first which calls rmtree() on the
      target tablespace directory.
      3. DoPendingDbDeletes() is called from within the subsequent
      AbortTransaction(). Since there was a pending db delete,
      dropDatabaseDirectory() is called and it eventually calls rmtree().
      Since the directory was already deleted at this point this rmtree
      produces the following warnings (which led to a test failure in CI):
      ```
      WARNING:  could not open directory <target_dboid_dir>: No such file or directory
      WARNING:  some useless files may be left behind in old database directory <target_dboid_dir>
      ```
      
      The movedb_failure_callback mechanism is totally unnecessary once we
      can ensure that the pending deletes mechanism caters to copydir
      failures. This patch takes care of that by moving the
      ScheduleDbDirDelete call before the copydir.
      
      Note: To minimize upstream diff, we replace the ENSURE block with a
      standalone block.
      Co-authored-by: NNing Yu <nyu@pivotal.io>
      3adad712
    • P
      Include pg_config_manual.h for gpfdist (#8359) · cad571b7
      Peifeng Qiu 提交于
      Commit 3b849ec0 changes USE_SSL macro to USE_OPENSSL, and provides
      compatibility switch in pg_config_manual.h, but gpfdist doesn't
      include it so USE_SSL macro is missing. Include pg_config_manual.h
      to get it back.
      cad571b7
    • R
      Fix the panic when estimating cost for aggregation on Result path. · 7d79311c
      Richard Guo 提交于
      For Result pathnode, its parent would be set to NULL. So we cannot
      reference its parent in cost_common_agg() when estimating cost for
      aggregation. Instead, we can use the rows in the Path and use 0 as the
      width.
      
      This patch fixes github issue #8357.
      7d79311c
    • P
      Add global transaction info in one phase commit xlog. (#8346) · 237ba5cc
      Paul Guo 提交于
      commit b5871009 tends to add that but the code is not right.
      
      Reviewed-by: Ning Yu
      Reviewed-by: Asim R P
      Reviewed-by: Ashwin Agrawal
      237ba5cc
    • B
      Use versioned_file for gp-internal-artifacts · 563e9f60
      Bradford D. Boyle 提交于
      The build artifacts in gp-internal-artifacts are not immutable. If
      `regexp` is used when fetching the resource, then new builds (with the
      same version) are not detected. This means that fixes in the packaging
      may not be correctly picked up by a pipeline.
      Authored-by: NBradford D. Boyle <bboyle@pivotal.io>
      563e9f60
  4. 13 8月, 2019 5 次提交
  5. 12 8月, 2019 12 次提交
    • D
      Check for --with-libcurl in gpcloud configuration · 6bbdff3b
      Daniel Gustafsson 提交于
      libcurl is required by gpcloud, but there was no explicit dependency
      on it in autoconf which would cause compiler errors in a build with
      gpcloud but without libcurl. Fix by adding a similar dependencycheck
      that we have for PXF.
      Reviewed-by: NLav Jain <ljain@pivotal.io>
      Reviewed-by: NJimmy Yih <jyih@pivotal.io>
      6bbdff3b
    • A
      Run deadlock_under_entry_db_singleton by itself · d160d5c1
      Asim R P 提交于
      The test injects a fault in StartTransaction().  This function is so
      generic that any concurrent test may trigger the fault, leading to
      failed or misleading outcome.  The test was using old faultinjector,
      which emitted status of a fault as NOTICE message.  NOTICE messages do
      not appear in isolation2 answer files.  So this problem went
      undetected.
      d160d5c1
    • A
      Do not expect warning to disable FTS for panic type fault · a6599e22
      Asim R P 提交于
      The intention behind the warning was to guide the test writer to avoid
      flaky behavior due to FTS intervening in the middle of a PANIC to mark
      a segment as down.
      
      This is good, however, the way the warning is emitted is not correct.
      The underlying assumption in the warning implementation (see
      fbd0f091) is that InjectFault() function is executed by the same
      process that created the gp_inject_fault extension.  This is not valid
      in the new libpq based fault injector because the fault is injected by
      a transient fault handler process, which is always different from the
      process that creates the extension when running regression tests.
      
      Evidently, there are several tests injecting 'panic' type fault
      already and their answer files don't have such warnings.  The
      bitmap_index test modified by this commit was the only test still
      using old fault injector interface to inject a 'panic' fault.  In the
      old fault injector, the above mentioned assumption was applicable and
      the warning was emitted.  Now that we've moved to new implementation
      wholesale, the warning must be removed.
      
      We should go back to drawing board for emitting the FTS warning but
      that's a separate patch.
      a6599e22
    • A
      Update answer files according to the new fault injector API · 748f86fb
      Asim R P 提交于
      Remove NOTICE messages that follow a gp_inject_fault() select statement.
      Replace the boolean value with text 'Success:' returned by the new
      interfae.
      
      For reference, the following sed script was used to identify 't'
      following a ' gp_inject_fault ' line:
      
      /^ gp_inject_fault $/{
         $!{ N
             :again1
             N
             s/ t$/ Success:/
             t again1
           }
         }
      748f86fb
    • A
      Update tests that were using gp_inject_fault2 · 590ac108
      Asim R P 提交于
      These tests were invoking the new fault injector interface using its
      temporary name - gp_inject_fault2().  Now the new interface is the
      only one present in the repository, named as gp_inject_fault().
      590ac108
    • A
      Replace old fault injector interface with the new one. · 83c336ad
      Asim R P 提交于
      The new interface employs a special libpq connection parameter and a
      libpq message to convey fault details to destination postmaster.  This
      interface has been in use for some time now.  It was getting cumbersome
      to maintain both the old as well as the new interface.
      
      To be clear, we now have only one interface to inject fault and that is
      "gp_inject_fault()".
      
      Existing tests that were using gp_inject_fault2() will be updated in a
      follow up commit.
      83c336ad
    • A
      gp_inject_fault2: obtain hostname and port from catalog · 41779acc
      Asim R P 提交于
      This makes the signature of the new interface match that of the old
      gp_inject_fault interface, so as to make it easy to replace the old interface
      with the new one.
      41779acc
    • D
      Add more aliases to the mailmap · 03cd8713
      Daniel Gustafsson 提交于
      Re-ran the script with a small tweak which generated two more hits,
      soon we should be caught up with all variations we have.
      03cd8713
    • W
      Init plan with input param follow upstream execution flow · f6f1f9bb
      Weinan WANG 提交于
      gpdb, we pre-execute init plan in ExecutorStart to reduce slice number.
      However, for some initplans, which require params from the same level node,
      should follow upstream execution flow.
      
      To recognize this initplan's pattern, record `extParam` when creating
      `subplan` object.
      
      Fix issue: #6953
      f6f1f9bb
    • X
      Correct memory unit · c8ac4643
      xiong-gang 提交于
      ExecChooseHashTableSize takes KB as parameter while global_work_mem returns bytes
      c8ac4643
    • Z
      Do not optimize select statement with locking clause when ORCA is enabled · 0e118441
      Zhenghua Lyu 提交于
      Currently, ORCA does not emit LockRows plannode. So when
      ORCA is enabled, we do not consider the query a simple
      select-for-locking case.
      0e118441
    • A
      Print more details when a behave test fails · 2237ef21
      Asim R P 提交于
      If a test decides to fail because not all segments are running, it will
      be nice to get the details of segments that are found to be not running.
      
      The details printed by this patch will only be shown by behave upon a test
      failure.  They will not be shown when a test passes.
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      Reviewed-by: NJacob Champion <pchampion@pivotal.io>
      Reviewed-by: NDavid Krieger <dkrieger@pivotal.io>
      2237ef21
  6. 10 8月, 2019 3 次提交
  7. 09 8月, 2019 1 次提交
  8. 08 8月, 2019 2 次提交
    • A
      Ensure the current probe does not cause flake · 38dd2da3
      Adam Berlin 提交于
      Wait until we've inserted the fts_probe skip fault, AND we have
      observed the fault being hit. This ensures that we've completed the
      in-progress fts probe before continuing on with a test.
      
      Previously, if we don't wait and our test continues forward to inject
      a panic, then then in-progress fts probe would do its job and promote
      the mirror.
      
      We lower the minimum allowed gp_fts_probe_interval to 1 second, which
      allows us to configure the interval to one second during our tests and
      speeds up the tests significantly.
      Reported-by: NAsim R P <apraveen@pivotal.io>
      38dd2da3
    • A
      Make sure externalgettup_custom() doesn't reach an unexpected state · 9b067ff0
      Adam Lee 提交于
      pstate->raw_buf_len should never be less than zero because it's the
      length of unprocessed data in externalgettup_custom(). Add an assert to
      make sure this.
      9b067ff0
  9. 07 8月, 2019 4 次提交