1. 27 9月, 2018 10 次提交
    • H
      Remove built-in stub functions for QuickLZ compressor. · 589533be
      Heikki Linnakangas 提交于
      The proprietary build can install them as normal C language functions,
      with CREATE FUNCTION, instead.
      
      In the passing, remove some unused QuickLZ debugging GUCs.
      
      This doesn't yet get rid of all references to QuickLZ, unfortunately. The
      GUC and reloption validation code still needs to know about it, so that
      they can validate the options read from postgresql.conf, when starting up
      postmaster. For the same reason, you cannot yet add custom compression
      algorithms, besides quicklz, as an extension. But this is another step in
      the right direction, anyway.
      Co-authored-by: NJimmy Yih <jyih@pivotal.io>
      Co-authored-by: NJoao Pereira <jdealmeidapereira@pivotal.io>
      589533be
    • D
      Rename variable to avoid risk of type collision · 5da162c4
      Daniel Gustafsson 提交于
      The comment states that "small" might be defined by socket.h, and while
      thats not true for all versions of sys/socket.h, it's still not a good
      name to use as it's common in Windows headers (should we ever revive a
      Windows port). Renaming to a non-colliding name is a small price to pay
      to avoid subtle bugs, so rename and remove the preprocessor dance.
      Reviewed-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
      5da162c4
    • D
      Refactor qp_functions test suite · 8f770d6d
      Daniel Gustafsson 提交于
      The test suite, which was ported over from TINC, was ignoring so much of
      the memorized output that it more or less didn't test anything (and the
      ignored blocks was as full of outdated output as one would imagine). The
      code was also formatted in weird ways and had needless NOTICEs thrown
      during execution.
      
      This refactors the testsuite to remove all ignore blocks, removes some
      utterly pointless tests (there are many more of them left), formats the
      code to be readable, fixes the output to work and removes some duplicate
      tests.
      
      The remaining bits of the suite is by no means terribly interestering,
      but it runs fast enough that it's worth keeping the leftovers for now.
      Reviewed-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
      8f770d6d
    • P
      Remove compile_gpdb_windows_cl job from master pipeline (#5804) · b0f124b5
      Peifeng Qiu 提交于
      Upstream has upgraded windows compile script and use newer version
      of Perl. This may block current merging effort. We plan to do
      windows native compiling for gpdb 6 so this job is no longer
      necessary for gpdb_master.
      b0f124b5
    • T
      Dispatcher can create flexible size gang (#5701) · a3ddac06
      Tang Pengzhou 提交于
      * change type of db_descriptors to SegmentDatabaseDescriptor **
      
      A new gang definination may consist of cached segdbDesc and new
      created segdbDesc, there is no need to palloc all segdbDesc struct
      as new.
      
      * Remove unnecessary allocate gang unit test
      
      * Manage idle segment dbs using CdbComponentDatabases instead of available* lists.
      
      To support vary size gang, we now need to manage segment dbs in a lower
      granularity, previously, idle QEs is managed by a bunch of lists like
      availablePrimaryWriterGang, availableReaderGangsN, this restrict
      dispatcher to only create N-size (N = number of segments) or 1-size
      gang.
      
      CdbComponentDatabases is a snapshot of segment components within current
      cluster, now it maintains a freelist for each segment component. When
      creating gang, dispatcher will make up a gang from each segment
      component (from freelist or create a new segment db). When cleaning up
      a gang, dispatcher will return idle segment dbs to each segment
      component.
      
      CdbComponentDatabases provide a few functions to manipulate segment dbs
      (SegmentDatabaseDescriptor *):
      * cdbcomponent_getCdbComponents
      * cdbcomponent_destroyCdbComponents
      * cdbcomponent_allocateIdleSegdb
      * cdbcomponent_recycleIdleSegdb
      * cdbcomponent_cleanupIdleSegdbs
      
      CdbComponentDatabases is also FTS version sensitive, so once a FTS
      version changed, CdbComponentDatabases destroy all idle segment dbs
      and allocate QEs in the new promoted segment. This provides the ability
      to transparent mirror failover to users.
      
      Since segment dbs(SegmentDatabaseDescriptor *) are managed by
      CdbComponentDatabases now, we can simplify the memory context
      management by replacing GangContext & perGangContext with
      DispatcherContext & CdbComponentsContext.
      
      * Postpone the error hanlding when creating gang
      
      Now we have AtAbort_DispatcherState, one advantage of it is that
      we can postpone gang error hanlding in this function and make
      code cleaner.
      
      * Handle FTS version change correctly
      
      In some cases, when a FTS version changed, we can't update current
      snapshot of segment components, to be more specifically, we can't
      destroy current writer segment dbs and create new segment dbs.
      
      These cases include:
      * session has temp table created.
      * query need two-phase commit and gxid has been dispatched to
        segments.
      
      * Replace <gangId, sliceId> map with <qeIdentifier, sliceId> map
      
      We used to dispatch a <gangId, sliceId> map along with query to
      segment dbs so segment dbs can know which slice they should
      execute.
      
      Now gangId is useless for a segment db because a segment db can
      be reused by different gang, so we need a new way to tell the
      info to segment dbs. To resolve this, CdbComponentDatabases
      assign a unique identifier to each segment db and make up a
      bitmap set which consist of segment identifiers for each slice,
      segment dbs then can go through the slice table and find the
      right slice to execute.
      
      * Allow dispatcher to create vary size gang and refine AssignGangs()
      
      Previously, dispatcher can only create N-size gang for
      GANGTYPE_PRIMARY_WRITER or GANGTYPE_PRIMARY_READER. this
      restrict dispatcher in many ways, one example is direct
      dispatch, it always create a N-size gang even it only
      dispatch the command to one segment, another example is
      some operations may be able to use N+ size gang, like
      hash join, if both inner and outer plan is redistributed,
      the hash join node can associate with a N+ size gang to
      execute. This commit changes the API of createGang() so the
      caller can specify a list of segments (partial or even
      duplicate segments), CdbCompoentDatabase will guarantee
      each segment has only one writer in a session. With this
      it also resolves another pain point of AssignGangs(), so
      the caller don't need to promote a GANGTYPE_PRIMARY_READER
      to GANGTYPE_PRIMARY_WRITER, or promote a GANGTYPE_SINGLETON
      _READER to GANGTYPE_PRIMARY_WRITER for replicated table
      (see FinalizeSliceTree()).
      
      With this commit, AssignGang() is very clear now.
      a3ddac06
    • P
      Remove remove_subquery_in_RTEs() call in standard_planner() (#5863) · 69cd1ec5
      Paul Guo 提交于
      As the comment said, this was useful howerver now that we have
      upstream add_rte_to_flat_rtable() to handle that, let's remove
      this call.
      69cd1ec5
    • D
      Move pxf-infra to new consolidated repo · abccfe61
      Divya Bhargov 提交于
      Co-authored-by: NDivya Bhargov <dbhargov@pivotal.io>
      Co-authored-by: NLav Jain <ljain@pivotal.io>
      abccfe61
    • D
      Remove unused variable · cc853420
      Daniel Gustafsson 提交于
      Fixes clang (and probably gcc) compiler warning on unused variable.
      Reviewed-by: NPaul Guo <pguo@pivotal.io>
      Reviewed-by: NVenkatesh Raghavan <vraghavan@pivotal.io>
      cc853420
    • D
      Increase default value of wal_keep_segments GUC. · dd18c4a0
      David Kimura 提交于
      Until we have replication slots this will keep enough xlog segments
      around so that mirrors have an opportunity to reconnect when a
      checkpoint removes a segment while the mirror is not streaming.
      Co-authored-by: NTaylor Vesely <tvesely@pivotal.io>
      dd18c4a0
    • H
      Mark various objects as internal, for purposes of object access hooks. · a673ddaa
      Heikki Linnakangas 提交于
      As far as I can see, the 'is_internal' flag is passed through to possible
      object access hook, but it has no other effect. Mark the LOV index and
      heap created for bitmap indexes, as well as constrains created for
      exchanged partitions as 'internal'.
      a673ddaa
  2. 26 9月, 2018 27 次提交
  3. 25 9月, 2018 3 次提交
    • A
      Disable 'emergency mode' autovacuum worker. · 5ce7f06d
      Adam Berlin 提交于
      In GPDB, we only want an autovacuum worker to start once we know
      there is a database to vacuum.
      
      When we changed the default value of the `autovacuum_start_daemon` from
      `true` to `false` for GPDB, we made the behavior of the AutoVacuumLauncherMain()
      be to immediately start an autovacuum worker from the launcher and exit,
      which is called 'emergency mode'.  When the 'emergency mode' is running it is possible
      to continuously start an autovacuum worker. Within the worker, the
      PMSIGNAL_START_AUTOVAC_LAUNCHER signal is sent when a database is found that is old
      enough to be vacuumed, but because we only autovacuum non-connectable
      databases (template0) in GPDB and we do not have logic to filter out
      connectable databases in the autovacuum worker.
      
      This change allows the autovacuum launcher to do more up-front decision making
      about whether it should start an autovacuum worker, including GPDB specific rules.
      Co-authored-by: NAshwin Agrawal <aagrawal@pivotal.io>
      5ce7f06d
    • P
      Allow to add motion to unique-ify the path in create_unique_path(). (#5589) · e9fe4224
      Paul Guo 提交于
      create_unique_path() could be used to convert semi join to inner join.
      Previously, during the Semi-join refactor in commit d4ce0921, creating unique
      path was disabled for the case where duplicats might be on different QEs.
      
      In this patch we enable adding motion to unique_ify the path, only if unique
      mothod is not UNIQUE_PATH_NOOP. We don't create unique path for that case
      because if later on during plan creation, it is possible to create a motion
      above this unique path whose subpath is a motion. In that case, the unique path
      node will be ignored and we will get a motion plan node above a motion plan
      node and that is bad. We could further improve that, but not in this patch.
      Co-authored-by: NAlexandra Wang <lewang@pivotal.io>
      Co-authored-by: NPaul Guo <paulguo@gmail.com>
      e9fe4224
    • D
      Remove bkuprestore test · d6409042
      Daniel Gustafsson 提交于
      The bkuprestore test was imported along with the source code during the
      initial open sourcing, but has never been used and hasn't worked in a
      long time. Rather than trying to save this broken mess, let's remove it
      and start fresh with a pg_dump TAP test which is a much better way to
      test backup/restore.
      Reviewed-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
      Reviewed-by: NJimmy Yih <jyih@pivotal.io>
      d6409042