1. 05 12月, 2015 4 次提交
    • A
      Fix the case where VACUUM FULL on an appendonly table would cause its · 65400193
      Abhijit Subramanya 提交于
      auxiliary tables to not get shrunk and generate a notice to the user.
      
      The AppendOnlyCompaction_IsRelationEmpty() function incorrectly assumed that
      the column number for tupcount column was the same in pg_aoseg and pg_aocsseg
      tables. This cause it to incorrectly return true even when the CO relation was
      not empty. This method is used in vacuum to determine if the auxiliary
      relations need to be vacuumed. Due to the bug, vacuum would update the
      pg_aocsseg relation and vacuum it within the same transaction and hence
      generate the NOTICE that it can't shrink the relation because transaction is
      already in progress and would not shrink the relation.
      
      Also make sure that we do a vacuum on the auxiliary relations only in two cases :-
      1. Vacuum cleanup phase
      2. Relation is empty and we are in prepare phase
      Otherwise we will end up with the same issue above if some of the segments have
      zero rows
      65400193
    • A
      Fix pg_regress to only ignore NOTICES specified by the init_file. · 29cccef6
      Abhijit Subramanya 提交于
      pg_regress uses a tool called gpdiff.pl in order to compare diffs between
      expected and actual result files in installcheck-good. pg_regress was hard
      coded to always invoke gpdiff.pl to ignore NOTICE statements. Instead it would
      be better to selectively ignore some NOTICE statements which are harmless and
      which show up very often and compare the rest. This patch causes pg_regress to
      invoke gpdiff.pl with an init_file which contains patterns that are to be
      ignored.
      29cccef6
    • K
    • A
  2. 04 12月, 2015 5 次提交
  3. 03 12月, 2015 10 次提交
    • H
      Merge commit '5f6d7353' from PostgreSQL 8.3 · 660e89c1
      Heikki Linnakangas 提交于
      This adds the log_temp_files GUC. All the other changes in this batch
      we had backported already.
      
      Conflicts:
      	contrib/adminpack/adminpack.c
      	contrib/pgbench/pgbench.c
      	doc/README.mb.big5
      	doc/TODO
      	doc/src/FAQ/TODO.html
      	doc/src/sgml/Makefile
      	doc/src/sgml/charset.sgml
      	doc/src/sgml/config.sgml
      	doc/src/sgml/docguide.sgml
      	src/backend/access/common/heaptuple.c
      	src/backend/access/heap/heapam.c
      	src/backend/storage/file/fd.c
      	src/backend/utils/misc/postgresql.conf.sample
      	src/include/access/heapam.h
      	src/include/access/htup.h
      	src/include/utils/guc.h
      	src/tools/copyright
      	src/tools/msvc/build.bat
      	src/tools/msvc/gendef.pl
      660e89c1
    • H
      de19a733
    • H
      Remove extra newlines from doc sources. · 8f3d0426
      Heikki Linnakangas 提交于
      I suspect these files used DOS line endings at some point, and they got
      mangled into two newlines. I did this for select.sgml as part of previous
      merge commit already.
      8f3d0426
    • H
      Merge commit '1e0bf904' from PostgreSQL 8.3 · c8e6f23e
      Heikki Linnakangas 提交于
      This adds support for NULLS FIRST/LAST.
      
      Also bump the ORCA version number, as ORCA had to be slightly modified to
      support NULLS FIRST.
      
      There is a change to the behaviour of NULL constants in a UNION. This used
      to work in Greenplum: "select 1 union select distinct null", but now it
      throws an error because the datatype of the NULL is not not known. It has
      always thrown an error in PostgreSQL, and I couldn't figure out if it was
      an intentional change in Greenplum, or something that fell out of other
      changes by accident. I'm not sure what part of this patch caused that change
      in behaviour. If that was intentional, we might have to change it again, but
      for now I changed the expected output of regression tests to match the
      upstream behaviour.
      
      Conflicts:
      	doc/TODO
      	doc/src/FAQ/TODO.html
      	doc/src/sgml/catalogs.sgml
      	doc/src/sgml/queries.sgml
      	doc/src/sgml/ref/create_index.sgml
      	doc/src/sgml/sql.sgml
      	doc/src/sgml/xindex.sgml
      	src/backend/access/hash/README
      	src/backend/access/nbtree/README
      	src/backend/access/nbtree/nbtsearch.c
      	src/backend/catalog/index.c
      	src/backend/catalog/toasting.c
      	src/backend/commands/analyze.c
      	src/backend/commands/indexcmds.c
      	src/backend/executor/nodeAgg.c
      	src/backend/executor/nodeSort.c
      	src/backend/nodes/copyfuncs.c
      	src/backend/nodes/outfuncs.c
      	src/backend/optimizer/path/allpaths.c
      	src/backend/optimizer/plan/createplan.c
      	src/backend/optimizer/util/clauses.c
      	src/backend/parser/analyze.c
      	src/backend/parser/gram.y
      	src/backend/parser/keywords.c
      	src/backend/parser/parse_clause.c
      	src/backend/parser/parser.c
      	src/backend/utils/adt/ruleutils.c
      	src/backend/utils/adt/selfuncs.c
      	src/backend/utils/cache/lsyscache.c
      	src/backend/utils/sort/tuplesort.c
      	src/include/catalog/catversion.h
      	src/include/catalog/pg_am.h
      	src/include/nodes/plannodes.h
      	src/include/nodes/relation.h
      	src/include/parser/parse_clause.h
      	src/include/utils/tuplesort.h
      	src/test/regress/expected/create_index.out
      	src/test/regress/expected/select.out
      	src/test/regress/sql/geometry.sql
      	src/test/regress/sql/select.sql
      	src/tools/msvc/README
      	src/tools/msvc/mkvcbuild.pl
      c8e6f23e
    • S
      a5ec7c78
    • Y
      857f1e10
    • E
      Revert "Clean up gpopt directory. Remove unused files." · 45a45f07
      Entong Shen 提交于
      This reverts commit 82216def.
      45a45f07
    • E
      Clean up gpopt directory. Remove unused files. · 82216def
      Entong Shen 提交于
      82216def
    • N
      Initiate the entries of the result table of function pinv inside pinv. · 6ec6830a
      Nikos Armenatzoglou 提交于
      Function pinv, and not its caller, should be responsible for initiating the entries of the result table.
      Actually, we move the fix of commit 5d870156 inside pinv.
      6ec6830a
    • H
      Fix alignment in FileRep_CalculateParity. · 8ece83bb
      Heikki Linnakangas 提交于
      This was causing a segfault when compiling with -O3 on Centos 7
      (gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)). I'm not 100% if that was
      actually a compiler bug, but unaligned access would definitely be wrong
      on architectures that are strict on alignment anyway.
      8ece83bb
  4. 02 12月, 2015 7 次提交
  5. 01 12月, 2015 11 次提交
    • 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
    • H
      Remove remnants of support for reading WAL files from old gpdb versions. · 2c8bce0f
      Heikki Linnakangas 提交于
      I already removed support from the backend and from tools in src/bin
      earlier, but missed these tools in contrib.
      2c8bce0f
    • H
      Remove gpmodcontrol.c · c36564fa
      Heikki Linnakangas 提交于
      I removed everything else from gpupgrade earlier, but missed this file
      for reason.
      c36564fa
    • H
      Make 'union' test case match the upstream version. · 6d594e28
      Heikki Linnakangas 提交于
      1. Remove unnecessary ORDER BYs (one of them still needed, as gpdiff.pl got
      confused by the ORDER BY within subquery, thinking that the order of the
      overall query was well-ordered).
      
      2. Move GPDB-added test queries to separate test file, union_gp.sql.
      6d594e28
    • H
      Move 'partition' bugbuster test to the main suite. · 16b1260e
      Heikki Linnakangas 提交于
      This is part of long-standing effort ot eliminate the separate bugbuster
      suite.
      16b1260e
    • H
      Move remaining 'ggg' tests from bugbuster partition test. · cf6b2ce3
      Heikki Linnakangas 提交于
      There are similar tests in the partition1 test already, so keep them
      together.
      cf6b2ce3
    • H
      Remove redundant tests. · 94a658bc
      Heikki Linnakangas 提交于
      These exactly same queries from bugbuster 'partition' test were already in
      the main suite's 'partition' test (and even had some comments there).
      94a658bc
    • H
      Split 'partition' test into two. · 33297250
      Heikki Linnakangas 提交于
      This test takes a very long time, so by splitting it and running other tests
      in parallel, we can hopefully utilize multiple CPUs better during regression
      tests, and finish the tests earlier.
      
      There's no big principle on where exactly I split this, but I did take care
      that the new 'partition1' test case doesn't need different expected output
      files for the ORCA and non-ORCA case. That always makes maintenance easier.
      33297250
    • H
      Move some tests from 'partition' to separate test file. · e61a363d
      Heikki Linnakangas 提交于
      These tests query pg_locks and fail if there are concurrent transactions
      holding locks. Isolate them to separate file, so that we can safely run
      other tests in parallel.
      e61a363d
    • J
      Improve gpssh-exkeys gethostbyaddr error message. · aac2f599
      Jason Champion 提交于
      When gethostbyaddr fails in gpssh-exkeys, print the name
      of the host that failed lookup for easier troubleshooting.
      aac2f599
    • K
      Fix row estimation of some catalog tables in planner. · 7ff79c6d
      Kenan Yao 提交于
      When the cluster has multiple segments, planner now mistakenly calculates the
      row number of catalog tables. One example is: SELECT COUNT(*) FROM pg_class may
      say the table has 200 rows of records, while EXPLAIN SELECT * FROM pg_class
      would say there are 200 * N rows of records, even if you have already issued ANALYZE
      upon pg_class and restarted the session(to reload the relation cache), where N
      is the number of primary segments.
      
      Another bug is for query like SELECT * FROM gp_dist_random('pg_class'), in this
      case, planner should assume the size of pg_class to be 200 * N, instead of the
      current 200.
      7ff79c6d
  6. 28 11月, 2015 2 次提交
    • H
      Merge commit '3a32ba2f' · 3f1c2890
      Heikki Linnakangas 提交于
      Only minor formatting and comment changes, everything else in this merge
      commit we had already backported earlier.
      
      Conflicts:
      	configure
      	configure.in
      	doc/TODO
      	doc/src/FAQ/TODO.html
      	doc/src/sgml/Makefile
      	doc/src/sgml/installation.sgml
      	doc/src/sgml/ref/initdb.sgml
      	doc/src/sgml/release.sgml
      	src/Makefile.shlib
      	src/backend/executor/execQual.c
      	src/backend/optimizer/path/costsize.c
      	src/backend/optimizer/plan/initsplan.c
      	src/backend/parser/parse_expr.c
      	src/backend/parser/parser.c
      	src/backend/port/Makefile
      	src/backend/utils/adt/float.c
      	src/backend/utils/adt/xml.c
      	src/bin/initdb/initdb.c
      	src/include/utils/xml.h
      	src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c
      	src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
      	src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
      	src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
      	src/interfaces/ecpg/test/expected/compat_informix-rnull.c
      	src/interfaces/ecpg/test/expected/compat_informix-test_informix.c
      	src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
      	src/interfaces/ecpg/test/expected/connect-test1.c
      	src/interfaces/ecpg/test/expected/connect-test2.c
      	src/interfaces/ecpg/test/expected/connect-test3.c
      	src/interfaces/ecpg/test/expected/connect-test4.c
      	src/interfaces/ecpg/test/expected/connect-test5.c
      	src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
      	src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
      	src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
      	src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
      	src/interfaces/ecpg/test/expected/preproc-comment.c
      	src/interfaces/ecpg/test/expected/preproc-define.c
      	src/interfaces/ecpg/test/expected/preproc-init.c
      	src/interfaces/ecpg/test/expected/preproc-type.c
      	src/interfaces/ecpg/test/expected/preproc-variable.c
      	src/interfaces/ecpg/test/expected/preproc-whenever.c
      	src/interfaces/ecpg/test/expected/sql-array.c
      	src/interfaces/ecpg/test/expected/sql-binary.c
      	src/interfaces/ecpg/test/expected/sql-code100.c
      	src/interfaces/ecpg/test/expected/sql-copystdout.c
      	src/interfaces/ecpg/test/expected/sql-define.c
      	src/interfaces/ecpg/test/expected/sql-desc.c
      	src/interfaces/ecpg/test/expected/sql-dynalloc.c
      	src/interfaces/ecpg/test/expected/sql-dynalloc2.c
      	src/interfaces/ecpg/test/expected/sql-dyntest.c
      	src/interfaces/ecpg/test/expected/sql-execute.c
      	src/interfaces/ecpg/test/expected/sql-fetch.c
      	src/interfaces/ecpg/test/expected/sql-func.c
      	src/interfaces/ecpg/test/expected/sql-indicators.c
      	src/interfaces/ecpg/test/expected/sql-quote.c
      	src/interfaces/ecpg/test/expected/sql-show.c
      	src/interfaces/ecpg/test/expected/thread-thread.c
      	src/interfaces/ecpg/test/expected/thread-thread_implicit.c
      	src/interfaces/libpq/Makefile
      	src/test/regress/expected/xml.out
      	src/test/regress/expected/xml_1.out
      	src/test/regress/sql/xml.sql
      3f1c2890
    • H
      Merge commit '29dccf5f' into master · 0b90b058
      Heikki Linnakangas 提交于
      Just the bump in copyright year in this, nothing interesting. And almost
      every file already carried a higher year already anyway, so I didn't
      touch those. I did update the PostgreSQL CVS tags where applicable, though,
      just to reduce the number of merge conflicts in future.
      0b90b058
  7. 27 11月, 2015 1 次提交
    • H
      Merge commit '5a2a527b' · c9a0fa4d
      Heikki Linnakangas 提交于
      Noth much interesting here, but I wanted to stop before the next upstream
      commit, which is a mechanical Copyright year bump.
      
      Conflicts:
      	contrib/btree_gist/btree_gist.sql.in
      	doc/FAQ
      	doc/FAQ_DEV
      	doc/FAQ_japanese
      	doc/bug.template
      	doc/src/FAQ/FAQ.html
      	doc/src/FAQ/FAQ_DEV.html
      	doc/src/FAQ/FAQ_japanese.html
      	doc/src/sgml/ref/pg_ctl-ref.sgml
      	doc/src/sgml/ref/postgres-ref.sgml
      	doc/src/sgml/ref/reindex.sgml
      	doc/src/sgml/release.sgml
      	src/backend/access/gin/ginvacuum.c
      	src/backend/access/heap/tuptoaster.c
      	src/backend/main/main.c
      	src/backend/postmaster/postmaster.c
      	src/backend/tcop/postgres.c
      	src/backend/utils/adt/float.c
      	src/backend/utils/adt/regexp.c
      	src/bin/pg_ctl/pg_ctl.c
      	src/bin/pg_dump/dumputils.c
      	src/include/catalog/pg_type.h
      	src/include/pg_config.h.win32
      	src/include/utils/builtins.h
      	src/interfaces/ecpg/compatlib/Makefile
      	src/interfaces/ecpg/ecpglib/Makefile
      	src/interfaces/ecpg/pgtypeslib/Makefile
      	src/interfaces/ecpg/preproc/Makefile
      	src/interfaces/libpq/Makefile
      	src/interfaces/libpq/libpq.rc.in
      	src/port/win32ver.rc
      	src/test/regress/pg_regress.c
      	src/tools/RELEASE_CHANGES
      	src/tools/copyright
      	src/tools/msvc/Project.pm
      c9a0fa4d