1. 25 8月, 2017 3 次提交
  2. 24 8月, 2017 16 次提交
    • H
      Revert the premature optimization in readfuncs.c. · a7de4d60
      Heikki Linnakangas 提交于
      We had replaced the upstream code in readfuncs.c that checks what kind of
      a Node we're reading, with a seemingly smarter binary search. However, that's
      a premature optimization. Firstly, the linear search is pretty darn fast,
      because after compiler optimizations, it will check for the string length
      first. Secondly, the binary search implementation required an extra
      palloc+pfree, which is expensive enough that it almost surely destroys any
      performance gain from using a binary search. Thirdly, this isn't a very
      performance-sensitive codepath anyway. This is used e.g. to read view
      definitions from the catalog, which doesn't happen very often. The
      serialization code used when dispatching a query from QD to QEs is a more
      hot codepath, but that path uses the different method, in readfast.c.
      
      So, revert the code the way it is in the upstream. This hopefully reduces
      merge conflicts in the future.
      
      Also, there was in fact a silly bug in the old implementation. It used
      wrong identifier string for the RowCompare expression. Because of that, if
      you tried to use a row comparison in a view, you got an error. Fix that,
      and also add a regression test for it.
      a7de4d60
    • H
      Enable forgotten test. · e1cbe31b
      Heikki Linnakangas 提交于
      Commit 0be2e5b0 added a regression test to check that if a view contains
      an ORDER BY, that ORDER BY is obeyed on selecting from the view. However,
      it forgot to add the test to the schedule, so it was never run. Add it.
      
      There is actually a problem with the test as it is written: gpdiff masks
      out the differences in the row order, so this test won't catch the problem
      that it was originally written for. Nevertheless, seems better to enable
      the test and run, than not run it at all. But add a comment to point that
      out.
      e1cbe31b
    • H
      Fix assertion failure on OOM. · 344e083c
      Heikki Linnakangas 提交于
      The assertion didn't take into account that malloc() might return NULL.
      344e083c
    • H
      Remove obsolete FIXME comments. · a37c6612
      Heikki Linnakangas 提交于
      When the new OID-dispatching mechanism was introduced (commit f9016da2),
      a lot of FIXME comments were left in calls to CdbDispatchUtilityStatement.
      These were places where I wasn't sure if the command that was executed
      might create new objects, with new OIDs assigned to them, that would need
      to be dispatched to the QE. I've now skimmed through the call sites, and
      checked that they are all for ALTER or DROP commands that should not create
      new OIDs, so remove the FIXME comments.
      a37c6612
    • H
      Remove obsolete PG_MODULE_MAGIC_CPP macro. · dd310e6c
      Heikki Linnakangas 提交于
      In theory, there could be an extension out there that uses it, but I doubt
      it. And if there is, the fix is simple: just use the regular PG_MODULE_MAGIC
      macro instead.
      dd310e6c
    • H
      Remove duplicated code. · da6d7f44
      Heikki Linnakangas 提交于
      The duplicate was introduced by the 8.3 merge, because we had already
      cherry-picked this in commit d481bd72. Harmless, but let's be tidy.
      da6d7f44
    • H
      Remove duplicate forward declaration. · eb39ffc1
      Heikki Linnakangas 提交于
      This is also in array.h.
      eb39ffc1
    • H
      Remove unused function. · 00e00b9c
      Heikki Linnakangas 提交于
      I think this is some kind of a debugging function, but since it's not
      exposed in pg_proc.h, there's no easy way to use it. Seems better to just
      remove it, than try to expose it.
      00e00b9c
    • H
      Misc whitespace fixes, to match upstream more closely. · 1db7cd41
      Heikki Linnakangas 提交于
      Also, mark transformIndexConstraints() function as static, as it is in
      the upstream. It's only used within the same file.
      1db7cd41
    • H
      Move and refactor newly-backported CTE code, closer to 8.4 sources. · 357dcbd2
      Heikki Linnakangas 提交于
      This will slightly reduce the merge conflicts with 8.4.
      357dcbd2
    • H
      Fix bug where a GUC is set twice on SET command. · bba4fe16
      Heikki Linnakangas 提交于
      In order to test this, modify the gpdiff tool to not suppress duplicate
      WARNINGs, if the duplicates don't have a segment number attached to them.
      The bug was easy to see by setting work_mem, which emits a WARNING in
      GPDB, except that suppressing the duplicates hid the bug. Even though we
      have a few tests that set work_mem, add one that does that explicitly for
      the purpose of testing for this bug, with a comment explaining its purpose.
      
      While we're at it, move the GPDB-specific test queries out of 'guc' test,
      into a new 'guc_gp' test, to keep the upstream 'guc' test pristine.
      
      Fixes github issue #3008, reported by @guofengrichard.
      bba4fe16
    • R
      Add GUC 'memory_spill_ratio' for resource group. · 44373949
      Richard Guo 提交于
      GUC 'memory_spill_ratio' can be set at multiple levels,
      in particular at resource group level and session level,
      and session would override resource group.
      
      When setting GUC 'memory_spill_ratio' at session level, the
      semantic validation will not be checked until it is referred
      by further queries.
      44373949
    • A
      Add an example of checking external table options · 210ab15e
      Adam Lee 提交于
          commit c5d2bc31
          Author: Haozhou Wang <hawang@pivotal.io>
          Date:   Mon Jan 2 22:37:20 2017 -0500
      
              Support 'OPTIONS' keyword in GPDB external table
      
              In case user wanna specify parameters with OPTIONS other than config
              file in LOCATION, it provides flexible and friendly grammar.
      
              Usage:
              CREATE EXTERNAL TABLE xxx LOCATION xxx FORMAT xxx
              [OPTIONS ( [option_key 'option_value' [, ...]] )]
              xxx;
      210ab15e
    • A
      Fix UnpackCheckPointRecord Assert failure · 98c9ef8c
      Ashwin Agrawal 提交于
      During gp_expand, the guc gp_before_filespace_setup is used to skip
      mmxlog and ptas information from the checkpoint record. However, the
      UnpackCheckPointRecord() was expecting additional information.
      
      The fix is to make that part optional based on the remaining length of
      checkpoint record.
      Signed-off-by: NXin Zhang <xzhang@pivotal.io>
      98c9ef8c
    • H
      Misc refactoring and comments fixes, to match upstream formatting. · 3a79b8a9
      Heikki Linnakangas 提交于
      Hopefully avoids a couple of merge conflicts in the future.
      3a79b8a9
    • J
      Revert setting auxiliary processes as Gp_role GP_ROLE_UTILITY · 93f7b617
      Jimmy Yih 提交于
      Setting auxiliary processes as GP_ROLE_UTILITY actually works fine
      until a standby master is initialized and started.  The standby master
      can go into certain redo paths such as redoDistributedCommitRecord
      which will exit early if the Gp_role is GP_ROLE_UTILITY.  Having the
      Gp_role check in these redo paths is not correct and will be revisited
      for refactor some other day.
      
      Commit context:
      https://github.com/greenplum-db/gpdb/commit/6810843fe1c2565dd4f6225ca2838c182b03ca72
      93f7b617
  3. 23 8月, 2017 9 次提交
  4. 22 8月, 2017 12 次提交