1. 10 11月, 2016 4 次提交
  2. 09 11月, 2016 5 次提交
    • D
      Remove unused macro NUM_EXTRA_OIDS_FOR_BITMAP · c38c4ae6
      Daniel Gustafsson 提交于
      The NUM_EXTRA_OIDS_FOR_BITMAP macro was only used for generating a
      set of extra relfilenodes for when running vacuuming a bitmap index.
      With the new relfilenode handling in 88f0623e it's no loger required.
      c38c4ae6
    • H
      Fix OID dispatching for casts. · 22541f04
      Heikki Linnakangas 提交于
      To test, backport test case for CREATE CAST from PostgreSQL 8.4. We don't
      apparently have any coverage for it previously. The upstream commit for the
      test case was:
      
      commit a1d2e165
      Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
      Date:   Fri Oct 31 09:17:17 2008 +0000
      
          Add test case for CREATE CAST.
      
      Reported by Yandong Yao
      22541f04
    • H
      Fix relfilenode conflicts. · 88f0623e
      Heikki Linnakangas 提交于
      There was a race condition in the way relfilenodes were chosen, because
      QE nodes chose relfilenodes for existing relations, e.g. at REINDEX or
      TRUNCATE, independently of the master, while for newly created tables,
      the relfilenode was chosen by the master. To fix:
      
      1. If the OID of a newly-created table is already in use as relfilenode
         of a different table in a QE segment, use a different relfilenode.
         (This shouldn't happen in the dispatcher, for the same reasons it
         cannot happen in a single-server PostgreSQL instance)
      
      2. Use a small cache of values recently used for a relfilenode, to close
         a race condition between checking if a relfilenode is in use, and
         actually creating the file
      88f0623e
    • K
    • K
      Making expression tree mutation unconditional (#1273) · 0d6fd9d5
      Karen Huddleston 提交于
      * Making expression tree mutation unconditional
      
      We previously did not consider that we need to mutate an expression tree
      only if there is a pseudo column. This introduces an executor crash in
      non-assert build as executor does not know how to interpret a pseudo
      column. Moreover, in assert build we fail an assert.
      
      The conditional we are removing  was introduced to optimize performance
      by commit a36436ea, but a quick performance
      run shows that performance is not noticeably affected by removing the
      optimization. [#131785597]
      Signed-off-by: NFoyzur Rahman <foyzur@gmail.com>
      
      * Adding PR comments.
      0d6fd9d5
  3. 08 11月, 2016 10 次提交
  4. 07 11月, 2016 3 次提交
    • D
      Remove assertion left on removed variable · 0b28dc2f
      Daniel Gustafsson 提交于
      Commit f9016da2 removed the definition of the relid variable, remove
      the assertion on it as well.
      0b28dc2f
    • H
      Revamp the way OIDs are dispatched to segments on CREATE statements. · f9016da2
      Heikki Linnakangas 提交于
      Instead of carrying a "new OID" field in all the structs that represent
      CREATE statements, introduce a generic mechanism for capturing the OIDs
      of all created objects, dispatching them to the QEs, and using those same
      OIDs when the corresponding objects are created in the QEs. This allows
      removing a lot of scattered changes in DDL command handling, that was
      previously needed to ensure that objects are assigned the same OIDs in
      all the nodes.
      
      This also provides the groundwork for pg_upgrade to dictate the OIDs to use
      for upgraded objects. The upstream has mechanisms for pg_upgrade to dictate
      the OIDs for a few objects (relations and types, at least), but in GPDB,
      we need to preserve the OIDs of almost all object types.
      f9016da2
    • D
      Fix assertions which have accidental side effects · f8a7e8a2
      Daniel Gustafsson 提交于
      Asserting that an assignment isn't zero is a valid use of Assert(),
      but these instances look more like accidental assignments due to a
      missing '='. getgpsegmentCount() is already internally asserting
      that the count is > 0 so we would never reach here in case it was.
      f8a7e8a2
  5. 05 11月, 2016 2 次提交
  6. 04 11月, 2016 1 次提交
  7. 03 11月, 2016 3 次提交
    • N
      Set llvm_isNull_ptr to false when the result of codegened expression evaluation is not null · bc6faa08
      Nikos Armenatzoglou 提交于
      So far we were assuming that the content of `llvm_isNull_ptr` variable, which is passed as
      input to expression evaluation, is always `false`. Consequently, when the result of the
      expression is not null, we avoid setting `llvm_isNull_ptr` to `false`.
      
      However, this assumption is not correct since in codegen we do not use a temporary `fcinfo`
      struct (for perfromance reasons), which initializes `fcinfo->isnull` to `false`.
      Instead, we pass a pointer to the isnull variable of the caller directly (which might not
      have been inititialized). For example, in `GenerateAdvanceAggregates` we pass a pointer
      to `transValueIsNull`.
      
      In this commit, we explicitly set `llvm_isNull_ptr` to `false` when the result is not null.
      This will cover all cases that the input is not initialized to `false`.
      Signed-off-by: NKarthikeyan Jambu Rajaraman <karthi.jrk@gmail.com>
      bc6faa08
    • N
      Enhance codegened advance_aggregates with support for null attributes · 8bbbd63f
      Nikos Armenatzoglou 提交于
      Codegened advance_aggregares did not support null attributes. With this
      patch, we enhance it with checks for strict functions and create the
      proper arguments' nullity checks accordingly.
      
      Authors: Nikos Armenatzoglou and Jimmy Yih
      8bbbd63f
    • H
      Avoid assigning an XID to DTX_CONTEXT_QE_AUTO_COMMIT_IMPLICIT queries. · a54d84a3
      Heikki Linnakangas 提交于
      This avoids a lot of overhead for short read-only queries. We still don't
      do lazy assignment for most transactions, like PostgreSQL 8.3 does, but
      this is a step in the right direction.
      a54d84a3
  8. 02 11月, 2016 6 次提交
    • H
      Disable write support for old-format AO table segments. · 53210fb2
      Heikki Linnakangas 提交于
      Segments that are still in an old format are treated as read-only. All new
      data go to new segments, in new format. This allows us to eventually get
      rid of the old format completely.
      
      This is hypothetical until we have pg_upgrade working for GPDB 4.3 -> 5.0
      upgrade, as you can't have old-format tables or segments at all in a
      cluster that's initialized with 5.0. Stay tuned for pg_upgrade, but this
      is preparatory work for that.
      53210fb2
    • H
      Make the AO table version information per-segment, rather than per-table. · 53590b35
      Heikki Linnakangas 提交于
      This meant moving the version field from pg_appendonly to the
      pg_aoseg_<oid> table (or pg_aocsseg_<oid>, for AOCS). We can still read
      and write both formats, but new segments will always be created in the new
      format (except if you set the test_appendonly_version_default GUC).
      53590b35
    • D
      Clean up file header comments · 6124be0d
      Daniel Gustafsson 提交于
      Remove unused fields from past version control systems and ensure
      that all filenames in the comments match the actual name of the file.
      Also fix some spelling and references.
      6124be0d
    • D
      Fix stat file management for resource queues · 5380cad3
      Daniel Gustafsson 提交于
      pgstat_write_statsfile() failed to write the resource queue statistics
      to the stat file which in turn makes the pg_stat_resqueues view empty.
      
      Patch by Github user LJoNe with testcase added by me
      5380cad3
    • H
      Remove banned api mechanism in gporca · 06f45085
      Haisheng Yuan 提交于
      gporca has a set of banned API calls which needs to be allowed with the
      ALLOW_xxx macro in order for gpopt to compile. But it should be the
      library caller(GPDB/Orca)'s resposibility to take care of the function call.
      
      see discussions on greenplum-db/gpdb#1136
      and https://groups.google.com/a/greenplum.org/forum/#!topic/gpdb-dev/Mcw6JPav6h4
      06f45085
    • F
      Process interrupts before reserving VMEM (#1257) · 5a6f9316
      foyzur 提交于
      * Adding support for interrupt processing before reserving more vmem.
      
      * Process pending interrupts before reserving VMEM.
      
      * Adding guc to control vmem tracker checking for interrupts before reserving more vmem.
      5a6f9316
  9. 01 11月, 2016 2 次提交
    • H
      Fix gcc warnings on misleading indentation. · cdfe1917
      Heikki Linnakangas 提交于
      In many places where we had used a mixture of spaces and tabs for
      indentation, new versions of gcc complained about misleading indentation,
      because gcc doesn't know we're using tab width of 4. To fix, make the
      indentation consistent in all the places where gcc gave a warning. Would
      be nice to fix it all around, but that's a lot of work, so let's do it
      in a piecemeal fashion whenever we run into issues or need to modify a
      piece of code anyway.
      
      For some files, especially the GPDB-specific ones, I ran pgindent over
      the whole file. I used the pgindent from PostgreSQL master, which is
      slightly different from what was used back 8.3 days, but that's what I had
      easily available, and that's what we're heading to in the future anyway.
      In some cases, I didn't commit the pgindented result if there were
      funnily formatted code or comments that would need special treatment.
      
      For other places, I fixed the indentation locally, just enough to make the
      warnings go away.
      
      I also did a tiny bit of other trivial cleanup, that I happened to spot
      while working on this, although I tried to refrain from anything more
      extensive.
      cdfe1917
    • K
      Fix ORCA error message and make it same as with Planner.(Closes #1247) · 4eb5db7a
      Karthikeyan Jambu Rajaramn 提交于
      - In ORCA, due to the way exception handled previously we do warning first
      and then later print error referring that message. In this commit, we
      enhanced the exception handling so we just print a single error message.
      - Also, we removed 'PQO unable to generate a plan' or 'Aborting PQO plan
      generation' message and make the error message as close as the planner.
      - Updated error message with filename and line number from where the exception
      is raised.
      4eb5db7a
  10. 31 10月, 2016 2 次提交
  11. 30 10月, 2016 2 次提交