1. 07 2月, 2017 3 次提交
  2. 04 2月, 2017 11 次提交
  3. 03 2月, 2017 10 次提交
    • H
      Fix the new workfile regression tests to work with ORCA. · 5deeb4d3
      Heikki Linnakangas 提交于
      The query in hashjoin_spill was choosing a different plan with ORCA, where
      the "other" side of the join was hashed than expected, and therefore it did
      not spill to disk as expected. Turn the join the query into an OUTER JOIN,
      to force the join order.
      
      In materialize_spill and sis_mat_sort tests, the test queries are tailored
      to produce a particular plan with a Materialize node that spills. ORCA
      chose a different plan that didn't do that. I was not able to quickly
      formulate the query in a way that would produce the same result with and
      without ORCA, so just force ORCA off for the test. The point of the test
      is to test workfile behavior at runtime, in executor, so that should be OK.
      
      Likewise, the sisc_sort_spill test was producing different plan with ORCA,
      without a Sort, so it wasn't testing what it was supposed to test. Disable
      ORCA for sisc_sort_spilll too.
      
      The helper function in sisc_mat_sort tests were producing "insufficient
      memory reserved for statement" errors with ORCA. Not sure why, but I bumped
      statement_mem slightly to not hit that limit anymore. It still spills to
      disk, which is the point.
      5deeb4d3
    • H
      Fix memory leak and error handling of workfiles. · f0a0a593
      Heikki Linnakangas 提交于
      There's no need to allocate ExecWorkFile struct in TopMemoryContext. We
      don't rely on a callback to clean them up anymore, they will be closed
      by the normal ResourceOwner and MemoryContext mechanisms. Otherwise,
      the memory allocated for the struct is leaked on abort.
      
      In the passing, make the error handling more robust.
      
      Also modify tuplestorenew.c, to allocate everything in a MemoryContext,
      rather than using gp_malloc() directly. ResourceOwner and MemoryContext
      mechanisms will now take care of cleanup on abort, instead of the custom
      end-of-xact callback.
      
      Remove execWorkFile mock test. The only thing it tested was that
      ExecWorkFile was allocated in TopMemoryContext. That didn't seem very
      interesting to begin with, and the assumption is now false, anyway. We
      could've changed the test to test that it's allocated in
      CurrentMemoryContext instead, but I don't see the point.
      
      Per report in private from Karthikeyan Rajaraman. Test cases also by him,
      with some cleanup by me.
      f0a0a593
    • J
      Update TINC Makefile. · 5469d254
      Jimmy Yih 提交于
      This commit cleans up some tinc.py calls, updates project names, and
      splits the cs-walrep test into two targets for CI test
      parallelization.
      5469d254
    • K
      Removing the fix me comment for bound in tuplesort_mk. · da86eea9
      Karthikeyan Jambu Rajaraman 提交于
      This is fixed with the commit d5463511.
      da86eea9
    • A
      Fix appendonly test with ORCA. · 5b10f6a4
      Ashwin Agrawal 提交于
      5b10f6a4
    • D
      Remove mention of GPOS from ORCA building instructions · b0ed3c44
      Daniel Gustafsson 提交于
      The GPOS library has been imported into the GPORCA repository so
      there is no need to install it separately anymore.
      b0ed3c44
    • M
      Add kerberos-smoke test into concourse pipeline · 7b0fe3a1
      Marbin Tan 提交于
      7b0fe3a1
    • J
      Make authdie use proc_exit and check if one is already in progress. · f66dfa4d
      Jimmy Yih 提交于
      This fixes a self-deadlock scenario in filerep postmaster reset. We
      encountered a situation in our testing where injecting PANIC on
      primary to force a postmaster reset would cause the mirror to hang
      while waiting for a child backend process to exit. This mirror backend
      process sends a message to its postmaster to start terminating backend
      child processes and then runs proc_exit. The mirror postmaster will
      quickly act on the message and start sending exit signals to its
      backend processes. In rare cases, the mirror backend process that
      messages the mirror postmaster can encounter a self-deadlock where
      authdie from SIGQUIT sent from its postmaster is called before its
      natural proc_exit finishes.
      
      This self-deadlock window can also occur when a psql connection is
      started and the forked backend process gets a bad status from
      ProcessStartupPacket. This will result in a proc_exit while SIGQUIT is
      assigned to authdie instead of quickdie so a very precise timed
      SIGQUIT could cause the process to self-deadlock.
      f66dfa4d
    • A
      Fix the calculation of hidden tuple ratio for Appendonly tables. · 9919edf6
      Abhijit Subramanya 提交于
      The function `AppendOnlyCompaction_GetHideRatio()` incorrectly truncated the
      fractional part while calculating the ratio of hidden tuples which caused the
      file to not be compacted (for e.g if the calculated threshold was 10.1% and the
      guc was set to 10%, the segfile would not be compacted). This patch correctly
      rounds up the calculated value to fix this issue.
      9919edf6
    • A
      Revamp gp_fastsequence handling. · a34214e1
      Ashwin Agrawal 提交于
      Context:
      gp_fastsequence is used to generate and keep track of row numbers for AO and CO
      tables. Row numbers for AO/CO tables act as a component to form TID, stored in
      index tuples and used during index scans to lookup intended tuple. Hence this
      number must be monotonically incrementing value. Also should not rollback
      irrespective of insert/update transaction aborting for AO/CO table, as reusing
      row numbers even across aborted transactions would yield wrong results for index
      scans. Also, entries in gp_fastsequence only must exist for lifespan of the
      corresponding table.
      
      Change:
      Given those special needs, now reserved entries in gp_fastsequence are created
      as part of create table itself instead of deffering their creation to insert
      time. Insert within same transaction as create table is the only scenario needs
      coverage from these precreated entries, reserved entries above hence means entry
      for segfile 0 (used by CTAS or ALTER) and segfile 1 (used by insert within same
      transaction as create). Rest all entries continue to use frozen inserts to
      gp_fastsequence as they can only happen after create table transaction has
      committed.
      
      With that change in logic to leverage MVCC to handle cleanup of entries for
      gp_fastseqeunce, enables to get rid of special recovery and abort code
      performing frozen deletes. With that code gone fixes issues like:
      1] `REINDEX DATABASE` or `REINDEX TABLE pg_class` hang on segment nodes if
      encounters error after Prepare Transaction.
      
      2] Dangling gp_fastsequence in scenario, transaction created AO table, inserted
      tuples and aborts after prepare phase is complete. To cleanup gp_fastsequence,
      must open the relation and perform frozen heap delete to mark the entry as
      invisible. But if the backend performing the abort prepared is not connected to
      the same database, then delete operation cannot be done and leaves dangling
      entries.
      
      Output of helpful interaction with Heikki Linnakangas and Asim R P.
      See discussion on gpdb-dev, thread 'reindex database abort hang':
      https://groups.google.com/a/greenplum.org/forum/#!topic/gpdb-dev/ASml6lN0qRE
      a34214e1
  4. 02 2月, 2017 3 次提交
  5. 01 2月, 2017 6 次提交
  6. 31 1月, 2017 4 次提交
    • J
      Added recoverseg to main master pipeline · 44a2c038
      Jamie McAtamney 提交于
      44a2c038
    • S
      Add ICG tests for motion hazard deadlock case. · 3b34a4d6
      Shreedhar Hardikar 提交于
      3b34a4d6
    • S
      Add comments about Motion deadlock hazards for Joins · 51bb35a2
      Shreedhar Hardikar 提交于
      This comes from a discussion on the GPDB mailing list about need of
      the prefetch_inner parameter in Joins and the deadlock case it is
      trying to prevent.
      51bb35a2
    • S
      Fix wrong result query during MergeJoin · fecad30b
      Shreedhar Hardikar 提交于
      When the size of the inner tuple in a MergeJoin is large, planner
      decides to place a Materialize on the top of the inner Sort operator.
      Furthemore if there is any Motion below the MergeJoin,
      mjnode->prefetch_inner is set to true.
      
      During execution of plan that has a Motion underneath a Materialize
      underneath a MJ, MJ retrieves one tuple from the Motion (via
      Materialize) and then resets the stream (by calling ExecReScan). Since
      the Materialize underneath is initialized with incorrect eflags, it
      deletes its tuplestore, instead of rewinding its cursor.  This fix sets
      the right eflags value during Init (see comments in ExecMaterialReScan).
      fecad30b
  7. 28 1月, 2017 3 次提交