1. 10 7月, 2018 2 次提交
    • D
      Include required headers · b25f7613
      Daniel Gustafsson 提交于
      Make sure to include all required header files to silence compilers
      that are picky about that.
      b25f7613
    • T
      Remove configure check prohibiting threaded libpython on OpenBSD. · b009259a
      Tom Lane 提交于
      According to recent tests, this case now works fine, so there's no reason
      to reject it anymore.  (Even if there are still some OpenBSD platforms
      in the wild where it doesn't work, removing the check won't break any case
      that worked before.)
      
      We can actually remove the entire test that discovers whether libpython
      is threaded, since without the OpenBSD case there's no need to know that
      at all.
      
      Per report from Davin Potts.  Back-patch to all active branches.
      Co-authored-by: NDaniel Gustafsson <dgustafsson@pivotal.io>
      b009259a
  2. 09 7月, 2018 4 次提交
  3. 07 7月, 2018 2 次提交
    • J
      Do not automatically create an array type for child partitions · a8f5a045
      Jimmy Yih 提交于
      As part of the Postgres 8.3 merge, all heap tables now automatically
      create an array type. The array type will usually be created with
      typname '_<heap_name>' since the automatically created composite type
      already takes the typname '<heap_name>' first. If typname
      '_<heap_name>' is taken, the logic will continue to prepend
      underscores until no collision (truncating the end if typname gets
      past NAMEDATALEN of 64). This might be an oversight in upstream
      Postgres since certain scenarios involving creating a large number of
      heap tables with similar names could result in a lot of typname
      collisions until no heap tables with similar names can be
      created. This is very noticable in Greenplum heap partition tables
      because Greenplum has logic to automatically name child partitions
      with similar names instead of having the user name each child
      partition.
      
      To prevent typname collision failures when creating a heap partition
      table with a large number of child partitions, we will now stop
      automatically creating the array type for child partitions.
      
      References:
      https://www.postgresql.org/message-id/flat/20070302234016.GF3665%40fetter.org
      https://github.com/postgres/postgres/commit/bc8036fc666a8f846b1d4b2f935af7edd90eb5aa
      a8f5a045
    • C
      Release access share lock in pg_get_partition_def functions · a8c54b94
      Chris Hajas 提交于
      The pg_get_partition_template_def and pg_get_partition_def functions
      take accesss share locks, but do not release them until the end of the
      transaction. If a transaction is long-running, this can conflict with
      other user operations. Is it not necessary to hold the lock indefinitely
      as the lock is only needed for the duration of the function call.
      Co-authored-by: NChris Hajas <chajas@pivotal.io>
      Co-authored-by: NKaren Huddleston <khuddleston@pivotal.io>
      a8c54b94
  4. 06 7月, 2018 10 次提交
    • J
      Fix create gang failure on dns lookup error on down mirrors. · dd861e72
      Jialun 提交于
      If a segment exists in gp_segment_configuration but its ip address can
      not be resolved we will run into a runtime error on gang creation:
      
          ERROR:  could not translate host name "segment-0a", port "40000" to
          address: Name or service not known (cdbutil.c:675)
      
      This happens even if segment-0a is a mirror and is marked as down.  With
      this error queries can not be executed, gpstart and gpstop will also
      fail.
      
      One way to trigger the issue:
      
      - create a multiple segments cluster;
      - remove sdw1's dns entry from /etc/hosts on mdw;
      - kill postgres primary process on sdw1;
      
      FTS can detect this error and automatically switch to mirror, but
      queries can not be executed.
      dd861e72
    • M
      docs - update system catalog maintenance information. (#5179) · dbee1c3c
      Mel Kiyama 提交于
      * docs - update system catalog maintenance information.
      
      --Updated Admin. Guide and Best Practices for running REINDEX, VACUUM, and ANALYZE
      --Added note to REINDEX reference about running ANALYZE after REINDEX.
      
      * docs - edits for system catalog maintenance updates
      
      * docs - update recommendation for running vacuum and analyze.
      
      Update based on dev input.
      dbee1c3c
    • L
      5dedc72c
    • L
      docs - add foreign data wrapper-related sql ref pages (#5209) · 525656dd
      Lisa Owen 提交于
      * docs - add foreign data wrapper-related ref pages
      
      * remove CREATE SERVER example referencing default fdw
      
      * edits from david, and his -> their
      525656dd
    • J
      Check all AO segment files during concurrent AO VACUUM · cd45683d
      Jimmy Yih 提交于
      We currently exit VACUUM early when there is a concurrent operation on
      an AO relation. Instead of exiting early, go through the rest of the
      AO segment files to see if they have crossed threshold for compaction.
      cd45683d
    • J
      Invalidate AppendOnlyHash cache entry at end of TRUNCATE · 19c48cb4
      Jimmy Yih 提交于
      TRUNCATE will rewrite the relation by creating a temporary table and
      swapping it with the real relation. For AO, this includes the
      auxiliary tables which is concerning for the AO relation's pg_aoseg
      table which holds information that a AO segment file is available for
      write or waiting to be compacted/dropped. Since we do not currently
      invalidate the AppendOnlyHash cache entry, the entry could have
      invisible leaks in its AOSegfileStatus array that will be stuck in
      state AOSEG_STATE_AWAITING_DROP. These leaks will persist until the
      user evicts the cache entry by not using the table to allow another AO
      table to cache itself in that slot or by restarting the database. We
      fix this issue by invalidating the cache entry at the end of TRUNCATE
      on AO relations.
      19c48cb4
    • J
      Invalidate AppendOnlyHash cache entry for AT_SetDistributedBy cases · 9a088849
      Jimmy Yih 提交于
      ALTER TABLE commands that are tagged as AT_SetDistributedBy require a
      gather motion and does its own variation of creating a temporary table
      for CTAS (basically bypassing the usual ATRewriteTable which actually
      does do AppendOnlyHash cache entry invalidation). Without the
      AppendOnlyHash cache entry invalidation, the entry could have
      invisible leaks in its AOSegfileStatus array that will be stuck in
      state AOSEG_STATE_AWAITING_DROP. These leaks will persist until the
      user evicts the cache entry by not using the table to allow another AO
      table to cache itself in that slot or by restarting the database. We
      fix this issue by invalidating the cache entry at the end of
      AT_SetDistributedBy ALTER TABLE cases.
      9a088849
    • J
      Fix schema in rangefuncs_cdb ICG test · 1a8bd0ad
      Jimmy Yih 提交于
      The schema is named differently from the one being used in the
      search_path so all the tables, views, functions, and etc. were
      incorrectly being created in the public schema.
      1a8bd0ad
    • O
      Remove deduplication in hyperloglog code · 9c456084
      Omer Arap 提交于
      We had significant deduplication in hyperloglog extension and utility
      library that we use in the analyze related code. This commit removes the
      deduplication as well as significant amount dead code. It also fixes
      some compiler warnings and some coverity issues.
      
      This commit also puts the hyperloglog functions in a separate schema
      which is non-modifiable by non superusers.
      Signed-off-by: NBhuvnesh Chaudhary <bchaudhary@pivotal.io>
      9c456084
    • L
      e839f9a2
  5. 04 7月, 2018 7 次提交
  6. 03 7月, 2018 6 次提交
  7. 02 7月, 2018 1 次提交
  8. 30 6月, 2018 7 次提交
    • D
      fix problematic xrefs · 7966ba4e
      David Yozie 提交于
      7966ba4e
    • I
      Extra docs for the pushdown feature (#5193) · ac917ce0
      Ivan Leskin 提交于
      * Extra docs for gp_external_enable_filter_pushdown
      
      Add extra documentation for 'gp_external_enable_filter_pushdown' and the pushdown feature in PXF extension.
      
      * Minor doc text fixes
      
      Minor documentation text fixes, proposed by @dyozie.
      
      * Clarify the pushdown support by PXF
      
      Add the following information:
      * List the PXF connectors that support pushdown;
      * State that GPDB PXF extension supports pushdown;
      * Add a list of conditions that need to be fulfilled for the pushdown feature to work when PXF protocol is used.
      
      * Correct the list of PXF connectors with pushdown
      
      * State that Hive and HBase PXF connectors support filter predicate pushdown;
      * Remove references to JDBC and Apache Ignite PXF connectors, as proposed by @dyozie (these are not officially supported by Greenplum).
      ac917ce0
    • K
      db95eb96
    • A
      Update the fsync test to allow room upto 7 buffers to flushed. · c97870fc
      Ashwin Agrawal 提交于
      Number of fsync buffers synced to disk varies based on how hint-bits gets
      updated and all. Like sometimes I see global table pg_tablespace buffer flushed
      and sometimes not depending on what tests were executed before this test.
      c97870fc
    • A
      Remove rd_issyscat from RelationData. · f56b5fb2
      Ashwin Agrawal 提交于
      Greenplum added rd_isyscat to Relation structure. Only usage of the same is in
      markDirty() to decide if buffer should be marked dirty or not. The setting of
      rd_issyscat is based in checking if relation name starts with "pg_" then set it
      else not. Which anyways is very loose.
      
      Modified instead to just make check based on if oid < FirstNormalObjectId or to
      cover for pg_aoseg tables RelationGetNamespace(relation) ==
      PG_AOSEGMENT_NAMESPACE. So, this allows us to remove the extra variable.
      
      This patch is not trying to change the intent of GUC
      `gp_disable_tuple_hints`. That's all together different discussion.
      f56b5fb2
    • S
      Remove irrelevant comments from sql test file · a8f6260e
      Shreedhar Hardikar 提交于
      a8f6260e
    • S
      Fix 'no parameter found for initplan subquery' · f50e5daf
      Shreedhar Hardikar 提交于
      The issue happens because of constant folding in the testexpr of the
      SUBPLAN expression node. The testexpr may be reduced to a const and any
      PARAMs, previous used in the testexpr, disappear, However, the subplan
      still remains.
      
      This behavior is similar in upstream Postgres 10 and may be of
      performance consideration. Leaving that aside for now, the constant
      folding produces an elog(ERROR)s when the plan has subplans and no
      PARAMs are used. This check in `addRemoteExecParamsToParamList()` uses
      `context.params` which computes the used PARAMs in the plan and `nIntPrm
      = list_length(root->glob->paramlist`, which is the number of PARAMs
      declared/created.
      Given the ERROR messages generated, the above check makes no sense.
      Especially since it won’t even trip for the InitPlan bug (mentioned in
      the comments) as long as there is at least one PARAM in the query.
      
      This commit removes this check since it doesn't correctly capture the
      intent.
      
      In theory, it could be be replaced by one specifically aimed at
      InitPlans, that is, find all the params ids used by InitPlan and then
      make sure they are used in the plan. But we already do this and
      remove any unused initplans in `remove_unused_initplans()`. So I don’t
      see the point of adding that.
      
      Fixes #2839
      f50e5daf
  9. 29 6月, 2018 1 次提交