1. 30 3月, 2017 1 次提交
    • D
      Ensure version output regardless of code tree · 0de5fc63
      Daniel Gustafsson 提交于
      Rather than relying on always having a full cloned repository when
      building, add fallbacks which work for trees with constrained (such
      as shallow-cloned trees), or no, history. When the tagged commit is
      reachable, use git describe, else rely on the version string in
      configure since that's required to always be there regardless of
      distribution mode. If we have git tree then include the HEAD sha1
      as well.
      
      While there, clean up versioning to more clearly separate us from
      upstream.
      0de5fc63
  2. 13 10月, 2016 1 次提交
    • J
      Disable aggressive loop optimizations in GCC 4.8+ (#1200) · 2e387d0e
      Jesse Zhang 提交于
      Summary:
      * Properly propagate the C++ compiler from autoconf
      * Disable aggressive loop optimizations in GCC 4.8+
      
      This commit is in the spirit of postgres/postgres@105f3ef4 , but done
      for C++ code so that the GPORCA translator can properly build when the
      compiler is GCC 4.8+
      
      Fixes greenplum-db/gpdb#1186 .
      
      TL;DR, here is the additional context on what specific to GPORCA translator:
      
      GCC 6.2.0 compiler (which is required for codegen) got aggressive loop optimization to remove loop when enumerating variable length array.
      
      In code `CTranslatorRelcacheToDXL.cpp`, we have a loop to enumerate all
      the attributes of an index:
      
      ```
      INT iAttno = pgIndex->indkey.values[ul];
      ```
      
      Where `values[ul]` is of following data structure:
      
      ```
      typedef struct
      {
      ...
      	int2		values[1];		/* VARIABLE LENGTH ARRAY */
      } int2vector;					/* VARIABLE LENGTH STRUCT */
      ```
      
      This is standard way of dealing with variable length array in Postgres. However, optimizer
      thinking there is only 1 element, hence removed the loop.
      
      This caused wrong result when using GPDB with GPORCA. The repro is
      ```
      -- multi-column index
      create table index_test (a int, b int, c int, d int, e int,
        constraint index_test_pkey PRIMARY KEY (a, b, c, d));
      
      insert into index_test select i,i%2,i%3,i%4,i%5 from generate_series(1,100) i;
      
      -- expecting using index scan with index cond: c=5
      explain select * from index_test where c = 5;
      ```
      
      When compile with GCC 6.2.0, the `index scan` is not selected, but a `table scan` is chosen
      instead. The root cause is the compiler removed the loop, and only keep the first column.
      
      The fix is to add $CXXFLAG auto detection to add the
      `-fno-aggressive-loop-optimizations` for $CXX compilers if that version of compiler supporting
      such optimization. Hence to avoid having the above issue for gpopt component.
      2e387d0e
  3. 20 5月, 2016 1 次提交
    • D
      Modernize and split out lookup code from autoconf · 107b21fb
      Daniel Gustafsson 提交于
      This attempts to clean up the autoconf script a bit and follow the
      upstream division of generic code in config/ with the actual lookup
      configuration in configure.in. Also updated our installation to rely
      on a more modern version of autoconf by backporting parts of upstream
      commit 7cc514ac. This commit consist of:
      
        * Decouple --enable-codegen and --with-codegen-prefix to not
          silently ignore prefixes if the enable flag isn't passed.
      	Emit a warning if configuring prefixes without codegen. Also
      	moves --with-codegen-prefix to require an argument since
      	--with-codegen-prefix without an argument is likely to hide
      	either a scripting bug or a misunderstanding from the user
        * Move program checks for cmake and apr-1-config to programs.m4
          and allow for path overrides and ensure to use the resolved
      	path when invoking cmake for --enable-codegen
        * Propagate the apr-1-config flags and objects to where used via
          Makefile.global rather than performing another lookup
        * Remove check for unused arguments since autoconf does that
          automatically since 2.63
        * Remove backported fseeko handling since that isn't relevant
          for modern autoconf versions
        * Minor help output tidying and spelling fixes
      107b21fb
  4. 07 4月, 2016 1 次提交
  5. 25 3月, 2016 1 次提交
    • S
      Adding GPDB code generation utils · 88e9baba
      Shreedhar Hardikar 提交于
      Squashed commit of the following:
      
      commit db752c0c916f36479b0c5049c671538565294c25
      Author: Nikos Armenatzoglou <narmenatzoglou@gmail.com>
      Date:   Thu Mar 24 14:01:38 2016 -0700
      
          Adding check to avoid unit test failures when sizeof(long) = 8
      
      commit 1c39c58279cf73af92811ed1b2e6f2bc22d01414
      Author: Shreedhar Hardikar <shardikar@pivotal.io>
      Date:   Thu Mar 17 19:42:47 2016 +0000
      
          --with-codegen-prefix instead of CMAKE_PREFIX_PATH
      
      commit 77978e92444580bc4e84dc3f6b3e366a09e92dba
      Author: Shreedhar Hardikar <shardikar@pivotal.io>
      Date:   Thu Mar 10 14:57:48 2016 +0000
      
          Make codegen work with GPDB build system and other minor fixes
      
            * Update CMakeLists to build SUBSYS.o
            * Update CMakeLists to build release build by default
            * Update CMakeLists to add tests in a loop.
            * Add codegen and cmake specific .gitignore
            * Update license and READMEs
            * Move codegen utils related header files back into src/backend/codegen/include/codegen
      Signed-off-by: NNikos Armenatzoglou <nikos.armenatzoglou@gmail.com>
      
      commit 1b61c12f4eb082f49a66c28957c22810e98a5074
      Author: Shreedhar Hardikar <shardikar@pivotal.io>
      Date:   Wed Mar 16 21:06:28 2016 +0000
      
          Remove codegen specific gtest source tree and use the one in gpAux.
      Signed-off-by: NNikos Armenatzoglou <nikos.armenatzoglou@gmail.com>
      
      commit 13bb2dcf3465be0ef240e316a149b2d8a125a9e9
      Author: Shreedhar Hardikar <shardikar@pivotal.io>
      Date:   Thu Mar 10 02:51:29 2016 +0000
      
          Set up GPDB to use codegen utilities
      
            * Move in codegen utility source and include files to GPDB specific locations.
            * Configure codegen with --enable-codegen and use gpcodegen namespace
      Signed-off-by: NNikos Armenatzoglou <nikos.armenatzoglou@gmail.com>
      
      commit 9a4e40f931f71cb7a82e15b51745944116bc10ab
      Author: Craig Chasseur <spoonboy42@gmail.com>
      Date:   Mon Nov 2 09:10:37 2015 -0800
      
          Introduce codegen utilties into GPDB.
      
          Support library for integrating LLVM code-generation and runtime
          compilation with Clang in a larger codebase.
      Signed-off-by: NNikos Armenatzoglou <nikos.armenatzoglou@gmail.com>
      88e9baba
  6. 10 3月, 2016 1 次提交
    • D
      Connect GPMapreduce to the build · e60fe566
      Daniel Gustafsson 提交于
      This adds a new switch to autoconf, --enable-mapreduce, to connect
      the GPMapreduce extension to the build. If set to on the mapreduce
      extension in gpAux/extensions will be built and installed.  As a
      side effect this will properly clean and distclean for gpfdist in
      gpAux/extensions as well. Autoconf checks for libyaml since it's
      a depedency for GPMapreduce.
      
      This is the first stab at gpmapreduce, once in we can start moving
      gpmapreduce back into src/bin and move the mapreduce test suite in
      under gpAux/extensions.
      e60fe566
  7. 02 3月, 2016 2 次提交
  8. 27 2月, 2016 1 次提交
    • M
      Move gpfdist to gpdb core. · e00ca2c4
      Marbin Tan 提交于
      As gpfdist will now be part of the gpdb build by default, we may just
      treat it as part of gpdb core.
      * Integrate gpfdist configure file to the top level configure and
        changed necessary files to accomadate the changes.
      * Modify travis.yml for gpfdist structural changes
      * Update gpfdist.c to use GP_VERSION from pg_config.h
      
      Fix warning issues from transform.c
      * There were many prototype warnings that was being mentioned.
        Added a headerfile for missing prototype warnings, also included the
        structs into the headerfile.
      
      Replace src/port/glob.c
      * src/port/glob.c is dead code at the moment and can be safely replaced by
        the windows changes from gpfdist/port
      
      Check for libyaml:
      * disable transformations for gpfdist if not found.
      e00ca2c4
  9. 02 2月, 2016 1 次提交
    • M
      Build gpfdist by default with configure · a3b296fd
      Marbin Tan 提交于
      * Add configuration option for gpfdist
      use --disable-gpfdist to turn off gpfdist build
      
      Enable to run extension regression tests from top level makefile
      
      * Add installcheck gpfdist into extensions
      * Add check for enterprise targeted builds
      * Pass apr config to gpfdist
      * Add JAVA_HOME check
      
      Authors:
      Marbin Tan and Shujie Shang
      a3b296fd
  10. 01 12月, 2015 1 次提交
    • G
      Rework SSE42 implementation and runtime logic to be more similar to PostgreSQL 9.5 · 6c025b52
      Garrett Thornburg 提交于
      This patch merges the PostgreSQL 9.5 implementation of SSE4.2 into GPDB.
      The SSE4.2 implementation was lifted right out of PostgreSQL without
      change to make merging later PostgreSQL releases easier.
      
      Update win32 configuration to support SSE4.2 runtime checks
      
      This change was pulled from "src/include/pg_config.h.win32" from the
      commits below.
      
      configure.in changes, determining if cpu instruction for perfomring runtime
      checks are availible, and moving some of the code to port SSE4.2 came from the
      following PostgreSQL commits:
      
      commit 3dc2d62d
      Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
      Date:   Tue Apr 14 17:05:03 2015 +0300
      
          Use Intel SSE 4.2 CRC instructions where available.
      
          Modern x86 and x86-64 processors with SSE 4.2 support have special
          instructions, crc32b and crc32q, for calculating CRC-32C. They greatly
          speed up CRC calculation.
      
          Whether the instructions can be used or not depends on the compiler and the
          target architecture. If generation of SSE 4.2 instructions is allowed for
          the target (-msse4.2 flag on gcc and clang), use them. If they are not
          allowed by default, but the compiler supports the -msse4.2 flag to enable
          them, compile just the CRC-32C function with -msse4.2 flag, and check at
          runtime whether the processor we're running on supports it. If it doesn't,
          fall back to the slicing-by-8 algorithm. (With the common defaults on
          current operating systems, the runtime-check variant is what you get in
          practice.)
      
          Abhijit Menon-Sen, heavily modified by me, reviewed by Andres Freund.
      
      commit b4eb2d16
      Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
      Date:   Tue Apr 14 19:56:00 2015 +0300
      	On gcc and clang, the _mm_crc32_u8 and _mm_crc32_u64 intrinsics are not
      	defined at all, when not building with -msse4.2. But on icc, they are.
      	So we cannot assume that if those intrinsics are defined, we can always use
      	them safely, we might still need the runtime check.
      
      	To fix, check if the __SSE_4_2__ preprocessor symbol is defined. That's
      	supposed to be defined only when the compiler is targeting a processor that
      	has SSE 4.2 support.
      
      	Per buildfarm members fulmar and okapi.
      6c025b52
  11. 28 10月, 2015 2 次提交
    • H
      Remove -Werror, replace with more specific -Wno-* options. · 0675ad72
      Heikki Linnakangas 提交于
      It's important to pay attention to compiler warnings, but -Werror isn't
      buying us much at the moment. Firstly, there are a lot of warnings on modern
      versions of gcc. I have to pass: "-Wno-error=unused-but-set-variable
      -Wno-error=enum-compare -Wno-error=address -Wno-error=maybe-uninitialized"
      to make it compile. More important than erroring out on warnings is to make
      sure there are no warnings to begin with. Once we get to that state, any
      warnings will stick out like sore thumb anyway, and you won't need -Werror
      to make them more annoying.
      
      We have a long way until we are 100% warning free, but most of the warnings
      come from upstream code. They have been fixed in later versions of
      PostgreSQL, so they will go away as we merge with upstream.
      0675ad72
    • I
      Import Greenplum source code. · 6b0e52be
      Initial Greenplum code dump 提交于
      6b0e52be
  12. 04 7月, 2011 1 次提交
    • T
      Back-patch creation of tar.bz2 tarball during "make dist". · 8de6e947
      Tom Lane 提交于
      Since commit a4d03bbc, "make dist" has
      built both gzip- and bzip2-compressed tarballs.  However, this was
      pretty useless, because our tarball build script didn't know about it
      and proceeded to overwrite the bz2 file with new data.  Back-patch the
      change to all active branches, so that creation of the tar.bz2 file
      can be removed from the build script.
      8de6e947
  13. 13 11月, 2007 1 次提交
  14. 29 9月, 2007 1 次提交
    • T
      Change initdb and CREATE DATABASE to actively reject attempts to create · 70b9b9b7
      Tom Lane 提交于
      databases with encodings that are incompatible with the server's LC_CTYPE
      locale, when we can determine that (which we can on most modern platforms,
      I believe).  C/POSIX locale is compatible with all encodings, of course,
      so there is still some usefulness to CREATE DATABASE's ENCODING option,
      but this will insulate us against all sorts of recurring complaints
      caused by mismatched settings.
      
      I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into
      a new src/port/ file so it could be shared by CREATE DATABASE.
      70b9b9b7
  15. 20 8月, 2007 1 次提交
  16. 27 6月, 2007 1 次提交
  17. 22 4月, 2007 1 次提交
  18. 15 4月, 2007 1 次提交
  19. 14 4月, 2007 1 次提交
    • A
      Enable building contrib/xml2 if configured using --with-libxml. · 6506a584
      Andrew Dunstan 提交于
      If this breaks things due to missing libxslt, then I'll have to
      revert it, but let's see if it breaks the buildfarm.
      
      Workarounds in case libxslt is missing include:
      . don't configure with libxml, or
      . don't build contrib modules from the contrib Makefile (use the individual module Makefiles instead), or
      . change the xml2 Makefile
      6506a584
  20. 09 2月, 2007 1 次提交
  21. 09 10月, 2006 1 次提交
  22. 04 10月, 2006 1 次提交
    • T
      Switch over to using our own qsort() all the time, as has been proposed · 6edd2b4a
      Tom Lane 提交于
      repeatedly.  Now that we don't have to worry about memory leaks from
      glibc's qsort, we can safely put CHECK_FOR_INTERRUPTS into the tuplesort
      comparators, as was requested a couple months ago.  Also, get rid of
      non-reentrancy and an extra level of function call in tuplesort.c by
      providing a variant qsort_arg() API that passes an extra void * argument
      through to the comparison routine.  (We might want to use that in other
      places too, I didn't look yet.)
      6edd2b4a
  23. 19 9月, 2006 1 次提交
  24. 11 9月, 2006 2 次提交
  25. 09 9月, 2006 1 次提交
  26. 23 8月, 2006 1 次提交
  27. 25 7月, 2006 1 次提交
  28. 22 7月, 2006 1 次提交
  29. 20 7月, 2006 1 次提交
  30. 20 4月, 2006 1 次提交
    • T
      Remove use of lorder and tsort while building static libraries. There's · 04ca4caa
      Tom Lane 提交于
      no evidence that any currently-supported platform needs this, and good
      reason to think that any platform that did need it couldn't use the static
      libraries anyway --- libpq, at least, has circular references.  Removing
      the code shuts up tsort warnings about the circular references on some
      platforms.
      04ca4caa
  31. 12 2月, 2006 1 次提交
  32. 28 9月, 2005 1 次提交
    • T
      Fix problems with PGXS builds against an installation tree that was · 4fc935a5
      Tom Lane 提交于
      relocated after installation.  We can't trust the installation paths
      inserted into Makefile.global by configure, so instead we must get the
      paths from pg_config.  This requires extending pg_config to support all
      the separately-configurable path names, but that was on TODO anyway.
      4fc935a5
  33. 03 8月, 2005 1 次提交
    • T
      Clean up CREATE DATABASE processing to make it more robust and get rid · 558730ac
      Tom Lane 提交于
      of special case for Windows port.  Put a PG_TRY around most of createdb()
      to ensure that we remove copied subdirectories on failure, even if the
      failure happens while creating the pg_database row.  (I think this explains
      Oliver Siegmar's recent report.)  Having done that, there's no need for
      the fragile assumption that copydir() mustn't ereport(ERROR), so simplify
      its API.  Eliminate the old code that used system("cp ...") to copy
      subdirectories, in favor of using copydir() on all platforms.  This not
      only should allow much better error reporting, but allows us to fsync
      the created files before trusting that the copy has succeeded.
      558730ac
  34. 28 7月, 2005 1 次提交
  35. 07 7月, 2005 1 次提交
  36. 06 7月, 2005 1 次提交
  37. 04 7月, 2005 1 次提交