1. 15 8月, 2019 6 次提交
    • R
      Make Multi-DQA on subquery work. · ea3610aa
      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>
      ea3610aa
    • P
      Add global transaction info in one phase commit xlog. (#8346) (#8387) · d3b6d09e
      Paul Guo 提交于
      commit 39f09c85 tends to add that but the code is not right.
      
      Reviewed-by: Ning Yu
      Reviewed-by: Asim R P
      Reviewed-by: Ashwin Agrawal
      
      Cherry-pick from 237ba5cc
      d3b6d09e
    • S
      Tear out movedb_failure_callback · a04fb6cb
      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>
      (cherry picked from commit 3adad712)
      Co-authored-by: NNing Yu <nyu@pivotal.io>
      a04fb6cb
    • R
      Fix the panic when estimating cost for aggregation on Result path. · 3e2fcc08
      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.
      3e2fcc08
    • B
      Disallow ALTER TABLE ADD CONSTRAINT USING INDEX on a partition root · bafa0ab6
      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>
      bafa0ab6
    • I
      synchronize the help file with the documentation · b8c44097
      Ivan Novick 提交于
      and add missing options
      b8c44097
  2. 14 8月, 2019 16 次提交
  3. 13 8月, 2019 3 次提交
  4. 12 8月, 2019 7 次提交
    • A
      Run deadlock_under_entry_db_singleton by itself · bec396da
      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.
      
      (cherry picked from commit d160d5c1)
      bec396da
    • A
      Update answer files according to the new fault injector API · 44fc358e
      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
           }
         }
      
      (cherry picked from commit 748f86fb)
      44fc358e
    • A
      Make pg_terminate_backend test more reliable · 5eb9b996
      Asim R P 提交于
      This test has failed at least once due to the terminate query being executed
      before the to be terminated 'create table' statement.  This was evident from
      master logs.  The commit makes it more reliable by injecting a fault and
      waiting for the fault to be trigggered before executing pg_terminate_backend().
      As a side benefit, we no longer need to create any additional table.
      
      (cherry picked from commit 63bed5eb)
      5eb9b996
    • A
      Update tests that were using gp_inject_fault2 · 1dee60dc
      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().
      
      (cherry picked from commit 590ac108)
      1dee60dc
    • A
      Replace old fault injector interface with the new one. · 42e23fbc
      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.
      
      (cherry picked from commit 83c336ad)
      42e23fbc
    • A
      gp_inject_fault2: obtain hostname and port from catalog · bd72f06b
      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.
      
      (cherry picked from commit 41779acc)
      bd72f06b
    • A
      Print more details when a behave test fails · 00f6ce7c
      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>
      (cherry picked from commit 2237ef21)
      00f6ce7c
  5. 10 8月, 2019 5 次提交
    • S
      Behave stop segments: Add -w flag to pg_ctl stop · 3cd531aa
      Shoaib Lari 提交于
      When reading the Behave test code for stopping segments, it is not obvious that
      we are waiting for the segment to stop. Therefore we are explicitly adding the
      `-w` flag to show the blocking behavior.
      Co-authored-by: NNikolaos Kalampalikis <nkalampalikis@pivotal.io>
      (cherry picked from commit 1e946005)
      3cd531aa
    • M
      docs - minor fixes to GUC list · 54160bdb
      mkiyama 提交于
      54160bdb
    • A
      Allow concourse_unit_tests to run without .bats files present · 99994497
      Amil Khanzada 提交于
      When there are no bats testcases present, the current coding returned an
      error due to the glob not being able to expand. This was made clear by
      the recent removal of the last test, and the discussion in #8270. Rather
      than using a glob, use ls and if statement. This allows us to keep the
      unittest framework in place even if there are currently no tests.
      Co-authored-by: NAmil Khanzada <akhanzada@pivotal.io>
      Co-authored-by: NDaniel Gustafsson <dgustafsson@pivotal.io>
      (cherry picked from commit fabc6ca5)
      99994497
    • B
      Applied Feedback · f6c8e2f3
      Bhuvnesh Chaudhary 提交于
      f6c8e2f3
    • B
      Handle jumps from sigusr1 handler to sigterm handler · 80e5c0c8
      Bhuvnesh Chaudhary 提交于
      Any temporary tables created in a session are cleaned up while exiting.
      However, consider the below actions being performed:
      1. A temporary table table is created. (Backend is used for this session)
      2. Backend for temp table recieves SIGUSR1 signal -> it invokes procsignal_sigusr1_handler
      3. Immediately, a SIGTERM is recieved by the backend before anything is
      processed in procsignal_sigusr1_handler.
      
      Here, SIGTERM will invoke die and it will attemp to remove the temp relations and commit
      the transaction. While committing the transaction, SyncRepWaitForLSN will be invoked and if the
      Commit LSN for the temp table session is greater than then LSN shipped to the Standby, the backend
      will wait for a byte to be written on the fd in WaitLatch and keep on polling until it recieves
      a byte on the pipe. However, Walsender will not be able to wake the process up, as it uses
      SIGUSR1 signal to communiate with the backend process and since the signal handler are not
      re-entrant the backend will not terminate.
      
      Before this commit as well, if we are in SIGUSR1 handler, SyncRepWaitForLSN will exit early,
      however, if the jump to die happened without setting the flag InSIGUSR1Handler, SyncRepWaitForLSN
      will not realize that its already in SIGUSR1 handler and will hit the issue as described above.
      In this commit, instead of using the flag we use pthread_sigmask to identify if we are already in
      SIGUSR1 handler.
      Co-authored-by: NSoumyadeep Chakraborty <sochakraborty@pivotal.io>
      Co-Authored-by: NJesse Zhang <jzhang@pivotal.io>
      80e5c0c8
  6. 09 8月, 2019 1 次提交
    • A
      Ensure the current probe does not cause flake · 2a3be962
      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.
      Reported-by: NAsim R P <apraveen@pivotal.io>
      (cherry picked from commit 38dd2da3)
      2a3be962
  7. 07 8月, 2019 2 次提交
    • K
      FTS: Ensure fresh results from a manual probe request · 0b73bd6c
      Kalen Krempely 提交于
      This patch addresses two main scenarios:
      1) Allowing multiple probes both internal and external to reuse the same
      results when appropriate (ie: piggybacking on previous results). Multiple
      requests should share the same results if they all request before the start of
      a new fts loop, and after the results of the previous probe.
      
      2) Ensuring fresh results from an external probe. When a request occurs during
      a current probe in progress, this request should get fresh results rather
      "piggybacking" or using the current results.
      
      We use similar logic as the checkpointer code to detect whether a probe is in
      progress with a probe start tick and probe end tick. To request a probe, we
      send a signal requesting a fts results, then wait for a new loop to start,
      then wait again for that current loop to finish. This implementation uses a
      busy wait loop, which includes a short sleep. In the future, we can
      leverage the upstream conditaion variable implementation which enables us
      to signal multiple fts notify processes.
      
      This was done via a manual cherry-pick from
      a674b6b3025b9dc56c4cb34b3330f8b7bc1bf757.
      Co-authored-by: NSoumyadeep Chakraborty <sochakraborty@pivotal.io>
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      Co-authored-by: NDavid Krieger <dkrieger@pivotal.io>
      Co-authored-by: NTaylor Vesely <tvesely@pivotal.io>
      Co-Authored-by: NAlexandra Wang <lewang@pivotal.io>
      Co-Authored-by: NJimmy Yih <jyih@pivotal.io>
      0b73bd6c
    • D
      Docs: increase max of extra_float_digits to 3 · fdecccf4
      dyozie 提交于
      fdecccf4