1. 11 7月, 2018 5 次提交
  2. 10 7月, 2018 12 次提交
  3. 09 7月, 2018 4 次提交
  4. 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
  5. 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
  6. 04 7月, 2018 7 次提交