1. 25 1月, 2016 1 次提交
  2. 22 1月, 2016 4 次提交
    • H
      Fix confusion over opfamily used for a join clause in a window agg. · 5f519a89
      Heikki Linnakangas 提交于
      I'm not 100% the code is doing the right thing even with this: If the
      pathkey's operator family doesn't match the join clause's operator family,
      the output isn't truly ordered the same way. This is not an issue for the
      case that I included in the regression test, where the join happens on a
      constant, but I can't figure out whether this might be an issue with some
      other query.
      5f519a89
    • H
      Remove unused field. · a653bd6a
      Heikki Linnakangas 提交于
      a653bd6a
    • H
      Fix assertion failure if the producer of a share scan is in subplan. · 7d9ca5db
      Heikki Linnakangas 提交于
      The comment in apply_shareinput_xslice() said that we process top-plan
      first, to ensure that we find the producer of a shared scan before its
      consumers, when the top plan contains a producer for subplans. But the
      situation can just as well be the other way 'round.
      
      No new test case added, because running the existing with_clause test
      with gp_cte_sharing=on trips the assertion.
      
      Fixes github issue #287.
      7d9ca5db
    • N
      Handle unfinished sort due to QueryFinishPending · e6acd16b
      Nikos Armenatzoglou 提交于
      My previous commit (3d0a4806), which was solving the issue described in pull request #276, was braking some ICG tests in some operating systems and we reverted it. This is a complete fix for the same issue.
      e6acd16b
  3. 21 1月, 2016 1 次提交
  4. 20 1月, 2016 1 次提交
    • N
      Handling unfinished sort due to QueryFinishPending · 3d0a4806
      Nikos Armenatzoglou 提交于
      This fix prevents gpdb from a segmentation fault in case that: i) a SharedInputScan has a Sort child node, ii) sort spills, and iii) somebody requests to finish the execution during the last stage of the sort (i.e., QueryFinishPending = true). Currently, in the above scenario, SharedInputScan continues the execution and tries to access sort's result_tape, which is NULL, due to QueryFinishPending.
      
      This commit makes a sort node to pretend that there are no results when QueryFinishPending flag is set to true. The commit also  creates a new Fault injector type and includes an ICG test.
      3d0a4806
  5. 19 1月, 2016 4 次提交
    • H
      Forbid DISTRIBUTED BY on an int2vector or aclitem column. · 56e7c16b
      Heikki Linnakangas 提交于
      int2vector and aclitem don't have B-tree operators, making them not
      mergejoinable. In the merge of the equivalence classes patch, I made
      cdb_make_pathkeys_for_expr() more strict on that, and it now throws
      an error if it's passed a datatype that doesn't have a mergejoinable
      = operator. It used to return a path key with InvalidOid as the sort
      operator, but that seems like a recipe for bugs elsehere.
      
      To fix, mandate that all gpdb-hashable datatypes must be mergejoinable.
      int2vector and aclitem are not, so forbid using them in DISTRIBUTED BY.
      
      This is a backwards-incompatible change, but hopefully no-one is using
      int2vector or aclitem in user-tables, at least not as a distribution key.
      56e7c16b
    • H
      Money is 64-bits wide nowadays. Fix comment. · 677772ee
      Heikki Linnakangas 提交于
      677772ee
    • V
    • H
      Remove dead, broken code. · b4abe122
      Heikki Linnakangas 提交于
      This is dead, because SubPlan is an Expr node and therefore cannot appear
      in a Plan tree.
      
      This was broken, because the "subplan = (SubPlan *) subplan" cast didn't
      do anything, and subplan was potentially uninitialized. It meant to say
      "subplan = (SubPlan *) plan".
      
      Spotted by Daniel Gustafsson.
      b4abe122
  6. 18 1月, 2016 5 次提交
  7. 16 1月, 2016 1 次提交
  8. 14 1月, 2016 2 次提交
    • G
      Fix typo "Maintains" · f619a1f8
      Goden Yao 提交于
      f619a1f8
    • A
      Add gp_read_error_log and gp_truncate_error_log functions to the catalog. · 4a1ec1b2
      Abhijit Subramanya 提交于
      gp_read_error_log and gp_truncate_error_log were two functions which were added
      in 4.3.3.0 to support the new error logging functionality for external tables.
      They were added to a "hidden" catalog in order to prevent bumping up the
      catalog version in a minor version release. We need to add them to the true
      catalog in a major release.
      
      Also in the process remove hiddencat mechanism since apart from the above two
      functions no other functions use it.
      4a1ec1b2
  9. 13 1月, 2016 1 次提交
    • A
      Fix tuple memoryleak for fast sequence number. · e2316eb3
      Ashwin Agrawal 提交于
      Every 100th AO or CO row insert in a transaction leaks 64 bytes
      (gpgastsequence tuple) memory. Hence for transaction performing bulk
      inserts to AO or CO table memory footprint keeps increasing, without
      the fix.
      e2316eb3
  10. 12 1月, 2016 3 次提交
    • H
      Make functions in gp_toolkit to execute on all nodes as intended. · 246f7510
      Heikki Linnakangas 提交于
      Moving the installation of gp_toolkit.sql into initdb, in commit f8910c3c,
      broke all the functions that are supposed to execute on all nodes, like
      gp_toolkit.__gp_localid. After that change, gp_toolkit.sql was executed
      in utility mode, and the gp_distribution_policy entries for those functions
      were not created as a result.
      
      To fix, change the code so that gp_distribution_policy entries are never
      never created, or consulted, for EXECUTE-type external tables. They have
      more fine-grained information in pg_exttable.location field anyway, so rely
      on that instead. With this change, there is no difference in whether an
      EXECUTE-type external table is created in utility mode or not. We would
      still have similar problems if gp_toolkit contained other kinds of
      external tables, but it doesn't.
      
      This removes the isMasterOnly() function and changes all its callers to
      call GpPolicyFetch() directly instead. Some places used GpPolicyFetch()
      directly to check if a table is distributed, so this just makes that the
      canonical way to do it. The check for system schemas that used to be in
      isMasterOnly() are no longer performed, but they should've unnecessary in
      the first place. System tables don't have gp_distribution_policy entries,
      so they'll be treated as master-only even without that check.
      246f7510
    • H
      Fix buffer overflow in parsing boolean-type storage options. · c3720bc2
      Heikki Linnakangas 提交于
      For "checksum=on/off", we used the "on" or "off" value to allocate space
      (i.e. 2 or 3 bytes), but then constructed a string that said "true" or
      "false" (4 or 5 bytes). That lead to overflowing the allocation by a few
      bytes, which produced warnings on assertion-enabled builds.
      
      The integer parsing almost has the same bug. We use the original string's
      length to allocate space, but we use %d to construct the value actually
      stored there. That happens to not be a bug, because the original length is
      always at least as large. This is a near-miss though: the original value
      might be in hexadecimal format, i.e. "0x7fffffff", and its decimal
      representation might be longer than the original. With 32-bit integers,
      however, that happens to not be possible. as the extra "0x" in front of the
      hex string provides enough padding. (i.e. strlen("0x7fffffff") >=
      strlen("2147483647)"))
      
      To fix, don't even try to count the space needed. Use a StringInfo instead.
      
      In the passing, clean up accumAOStorageOpt function in some other ways:
      remove the namelen argument to make it a bit more readable (this is hardly
      performance-critical code), and don't split error message across lines
      (makes it easier to grep for them if you need to find where an error
      is coming from).
      c3720bc2
    • H
      Add minirepro to let user dump minimal set of DDL and statistics for a given query · bc8726ad
      Haisheng Yuan 提交于
      Usage: minirepro <database> [options]
      
      Options:
        --version             show program's version number and exit
        -?, --help            Show this help message and exit
        -h HOST, --host=HOST  Specify a remote host
        -p PORT, --port=PORT  Specify a port other than 5432
        -U USER, --user=USER  Connect as someone other than current user
        -q QUERY_FILE         file name that contains the query
        -f OUTPUT_FILE        minirepro output file name
      
      Closes #157.
      bc8726ad
  11. 08 1月, 2016 4 次提交
  12. 07 1月, 2016 13 次提交