1. 30 11月, 2017 20 次提交
    • J
      Restrain replay of MMXLOG and smgr xlog records · 08f4e145
      Jimmy Yih 提交于
      MMXLOG records should only be replayed in standby mode and smgr create
      xlog records should not do anything until persistent tables and MMXLOG
      records are removed from Greenplum.
      
      Author: Jimmy Yih <jyih@pivotal.io>
      Author: Asim Praveen <apraveen@pivotal.io>
      08f4e145
    • J
      fix mocker.py for mocking guc_gp.c · e2d8afa9
      Jimmy Yih 提交于
      There was a hack to exclude guc.c from doing single-line comment (//)
      removal when creating mock c files. The hack is no longer needed in
      guc.c but is now needed in guc_gp.c since the offending line was moved
      to guc_gp.c.
      e2d8afa9
    • J
      isolation2 enhancement and fixes · 2295c1fd
      Jimmy Yih 提交于
      1. When forked command is not blocking, give the output that the pipe
         received to see why it did not block.
      2. Fix utility mode quit so that a utility mode connection can be
         restarted when connection is closed by postmaster.
      3. Fix ! shell commands by processing -- as part of the shell command
         instead of the start of a SQL comment
      2295c1fd
    • J
      Only allow fts probe process to touch fts probe pause GUC · c7c5b6d2
      Jimmy Yih 提交于
      Some master processes were calling gpvars_assign_gp_fts_probe_pause
      when they should not. This was found when the new stats collecter
      process errored out on this function call. We also move it to fts.c
      where it will live alongside the other fts code.
      
      Also, check for interrupts in fts sleep loop so that fts probe process
      can process SIGHUP properly.
      c7c5b6d2
    • A
      dbcommands: fix maybe-unitialized warning from upstream · 999359d0
      Amil Khanzada 提交于
      Prior to this commit, the below warnings were occurring with GCC versions 6.2.0
      on CentOS 6 and 6.3.0 on Ubuntu 14.
      These are actually invalid because the `get_dbinfo()` call will always fill in
      those variables but the compiler is not smart enough to detect this.
      
      The code change of this commit has not happened on the latest upstream Postgres
      (10.1), so there will be merge conflicts in future, but we decided as a team
      in #3871 that it was better to fix the warnings.
      
      In file included from ../../../src/include/postgres.h:53:0,
                       from dbcommands.c:22:
      dbcommands.c: In function ‘createdb’:
      ../../../src/include/utils/elog.h:184:4: error: ‘src_ctype’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
          errfinish rest; \
          ^~~~~~~~~
      dbcommands.c:616:11: note: ‘src_ctype’ was declared here
        char    *src_ctype;
                 ^~~~~~~~~
      In file included from ../../../src/include/postgres.h:53:0,
                       from dbcommands.c:22:
      ../../../src/include/utils/elog.h:184:4: error: ‘src_collate’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
          errfinish rest; \
          ^~~~~~~~~
      dbcommands.c:615:11: note: ‘src_collate’ was declared here
        char    *src_collate;
                 ^~~~~~~~~~~
      Signed-off-by: NDavid Sharp <dsharp@pivotal.io>
      999359d0
    • D
      configure: Enable -Werror=uninitialized · 4ee9323b
      David Sharp 提交于
      4ee9323b
    • D
      walrep: Fix maybe-unitialized warnings in test_receive_and_verify() · 10cc6108
      David Sharp 提交于
      Prior to this commit, the below warnings were occurring on GCC 6.2.0.
      
      The warnings seem valid but unlikely, so we just NULL initialize
      logStreamStart, which would most likely still land in the correct error
      case.
      
      gcc -O3 -std=gnu99  -Wall -Wmissing-prototypes -Wpointer-arith -Werror=uninitialized -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fno-aggressive-loop-optimizations -Wno-unused-but-set-variable -Wno-address  -fpic -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2   -c -o gplibpq.o gplibpq.c
      In file included from ../../../src/include/postgres.h:53:0,
                       from gplibpq.c:7:
      gplibpq.c: In function 'test_receive_and_verify':
      ../../../src/include/utils/elog.h:311:3: error: 'logStreamStart.xrecoff' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         elog_finish(elevel, __VA_ARGS__); \
         ^~~~~~~~~~~
      gplibpq.c:140:15: note: 'logStreamStart.xrecoff' was declared here
          XLogRecPtr logStreamStart;
                     ^~~~~~~~~~~~~~
      In file included from ../../../src/include/postgres.h:53:0,
                       from gplibpq.c:7:
      ../../../src/include/utils/elog.h:311:3: error: 'logStreamStart.xlogid' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         elog_finish(elevel, __VA_ARGS__); \
         ^~~~~~~~~~~
      gplibpq.c:140:15: note: 'logStreamStart.xlogid' was declared here
          XLogRecPtr logStreamStart;
                     ^~~~~~~~~~~~~~
      Signed-off-by: NAmil Khanzada <akhanzada@pivotal.io>
      10cc6108
    • D
      configure: Fix uninitialized warnings in c-library.m4 · d81079db
      David Sharp 提交于
      Fixes for:
      - PGAC_FUNC_GETTIMOFDAY_1ARG and
      - PGAC_FUNC_GETPWUID_R_5ARG
      d81079db
    • D
    • D
      Travis: Use upgraded compiler gcc-6 · 5e8e3588
      David Sharp 提交于
      5e8e3588
    • J
      configure: Allow adding a custom string to PG_VERSION · 4b0f052d
      Jesse Zhang 提交于
      > This can be used to mark custom built binaries with an extra version
      > string such as a git describe identifier or distribution package release
      > version.
      
      From: Oskari Saarenmaa <os@ohmu.fi>
      Originally commited by Peter Eisentraut, adapted by Pivotal.
      (cherry picked from commit 46328916)
      4b0f052d
    • J
      Defer PG_VERSION_STR and PG_VERSION_NUM · 0fbeb918
      Jesse Zhang 提交于
      We already had the pointer size check in the upstream order in our
      genesis open source commit 6b0e52be , but we seem to have missed the
      rest of the rearrangement from upstream.
      
      This commit completes that cherry-pick, to reduce merge diff with
      (admittedly much later) commit 46328916 .
      
      > Doesn't seem like a good idea to be doing AC_CHECK_SIZEOF(void *) so much
      > earlier than all the other sizeof checks, and it certainly fails to follow
      > the order suggested at the file head.  Rearrange.
      Author: Tom Lane
      Adapted by Pivotal
      
      (cherry picked from commit 075ac80d)
      0fbeb918
    • J
      Update SELECT version() to show whether it is a 32 or 64-bit backend binary. · 448386b5
      Jesse Zhang 提交于
      (cherry picked from commit b32a290b)
      448386b5
    • A
      2c1ace7a
    • H
      Remove some code that was duplicated by a mis-merge. · 8b60e44d
      Heikki Linnakangas 提交于
      Harmless, but clearly useless and unintentional.
      8b60e44d
    • T
      Add missing reset of need_initialization in reloptions code. · fb32b601
      Tom Lane 提交于
      This resulted in useless extra work during every call of parseRelOptions,
      but no bad effects other than that.  Noted by Alvaro.
      
      (Cherry-picked from PostgreSQL commit eb9954e362)
      fb32b601
    • H
      Fix initialization of GPDB-specific AO reloptions. · a22deb9f
      Heikki Linnakangas 提交于
      The options should only be registered once. Surprisingly, the duplicates
      seem to be harmless, because everything worked, but the accumulation of
      more and more reloptions was slowing down tests that created a lot of
      tables.
      a22deb9f
    • G
      Update README instructions for ORCA install (#3983) · 70d0b90d
      Goutam Tadi 提交于
      Signed-off-by: NLarry Hamel <lhamel@pivotal.io>
      70d0b90d
    • J
      pg_dumpall: fix uninitialized variable warning · e8e7cc4a
      Jacob Champion 提交于
      A bad 8.4 merge resolution on my part. We may not support older
      server_versions in GPDB's pg_dump, but that doesn't mean we should use
      uninitialized memory if we come across one.
      
      error_unsupported_server_version() comes from pg_dump.c; this commit is
      a companion to b4c5a618.
      e8e7cc4a
    • J
      106bc290
  2. 29 11月, 2017 13 次提交
    • H
      Remove extra logging from cdb_dump_agent. · 0ef5ea65
      Heikki Linnakangas 提交于
      We were inconsistent with what's logged and what's not. And some objects
      were logged with the GPDB-specific timestamp headers, while others were
      not. Make it consistent, by removing the extra logging altogether, making
      it consistent with the upstream. The status messages are now only logged in
      verbose mode, and there are no timestamps on them. Use 'ts' or similar if
      you wish to have timestamps in your logs.
      
      Author: Karen Huddleston <khuddleston@pivotal.io>
      0ef5ea65
    • H
      Remove unnecessary reset() function. · 1eb2a5cb
      Heikki Linnakangas 提交于
      It was only used at the end of cdb_dump_agent, shortly before it calls
      exit(). There's no need to reset variables or free memory if we're just
      about to exit the whole process. pg_dump leaves behind a lot of small
      allocations, this was just the tip of the iceberg. Better to be identical
      to the upstream, to avoid merge conflicts. (reset() was an awfully generic
      name for a function anyway, BTW)
      
      In the passing, also mark buildIndexArray() function as static, like it is
      in the upstream.
      1eb2a5cb
    • D
      docs - fixing broken dita xml · 02d13562
      dyozie 提交于
      02d13562
    • A
      Update answer files for default storage parameters test. · 84cd6f85
      Abhijit Subramanya 提交于
      Commit 8e6aed42 changed the format of the error
      messages for reloptions but missed updating the answer files for the default
      storage parameters test.
      
      Author: Abhijit Subramanya <asubramanya@pivotal.io>
      Author: Taylor Vesely <tvesely@pivotal.io>
      84cd6f85
    • L
      Enable Gphdfs oss build by removing references to custom hadoop 1.x libraries (#3947) · c1f523c0
      Lav Jain 提交于
      * Remove GPHDFS 1.0 and 1.1
      
      * Remove custom ivy repo settings
      c1f523c0
    • M
      Merge with PostgreSQL 8.4devel, upto commit ba748f7a (reloptions refactor). · 8e6aed42
      Max Yang 提交于
      Merge the next commit from PostgreSQL 8.4, which refactors reloptions.c to
      use a table-based parser. We are merging this as a separate commit, because
      this needed also refactoring all the GPDB-added reloptions to the new
      model.
      
      This adds a new RELOPT_KIND_INTERNAL "relation kind", for TOAST tables and
      auxiliary tables of append-only relations, like the AO visimap and block
      dir. That will probably be refactored away later in the merge, when we
      merge upstream commit 1c855f01, as that commit introduces a new
      RELOPT_KIND_TOASTVALUE kind for TOAST tables, instead.
      
      This also includes the new fillRelOptions(), from upstream commit
      8ebe1e35 (also from 8.4), because that was very handy in the refactoring
      of the GPDB code.
      
      Author: Xiaoran Wang <xiwang@pivotal.io>
      Author: Heikki Linnakangas <hlinnakangas@pivotal.io>
      8e6aed42
    • T
      Fix a violation of WAL coding rules in the recent patch to include an · 5c02798f
      Tom Lane 提交于
      "all tuples visible" flag in heap page headers.  The flag update *must*
      be applied before calling XLogInsert, but heap_update and the tuple
      moving routines in VACUUM FULL were ignoring this rule.  A crash and
      replay could therefore leave the flag incorrectly set, causing rows
      to appear visible in seqscans when they should not be.  This might explain
      recent reports of data corruption from Jeff Ross and others.
      
      In passing, do a bit of editorialization on comments in visibilitymap.c.
      
      (This is a cherry-pick of upstream PostgreSQL commit fedb166549. We bumped
      into this bug in the "test_crash_recovery_schema_topology.py" tests in the
      concourse pipeline.)
      5c02798f
    • A
      Remove unused external declaration · acea41eb
      Asim R P 提交于
      The function DefineForeignRelation referenced in utility.c was removed
      in 601c58c3.
      Signed-off-by: NTaylor Vesely <tvesely@pivotal.io>
      acea41eb
    • T
      Rename README to README.md · c9405d2d
      Taylor Vesely 提交于
      Signed-off-by: NXin Zhang <xzhang@pivotal.io>
      c9405d2d
    • J
      Replace -1 exit code with 255 · acb25812
      Jesse Zhang 提交于
      This is more portable, as some compliant shells don't understand
      "exit -1".
      
      To quote POSIX 2008:
      
      > The exit status shall be n, if specified, except that the behavior is
      > unspecified if n is not an unsigned decimal integer or is greater than
      > 255.
      acb25812
    • J
      Replace 'echo -e' with printf · b52158ce
      Jesse Zhang 提交于
      This commit replaces invocation of `echo -e` with printf.
      
      echo as defined by POSIX only supports -n. "echo -e" is a GNU-ism and
      Bashism.  Noticeably /bin/echo -e behaves very differently on macOS vs
      on GNU/Linux.
      b52158ce
    • J
      remove command-not-found tests for COPY · 139a065d
      Jesse Zhang 提交于
      After commit 2b51c16b Greenplum diverged
      from the upstream behavior of using `popen`, and instead captures the
      stderr of the COPY PROGRAM and prints that out in case of error (read:
      non-zero return status).
      
      This means that we no longer specially handle the case of return status
      127 and use `wait_result_to_str` to tell the user "command not found".
      Instead, we output whatever is in the stderr of the standard shell
      /bin/sh.
      
      That means a command-not-found is completely indistinguishable from the
      case where the program invoked returning non-zero status and printing
      something into its stderr. Moreover, the output of command-not-found is
      not portable, and not really controlled by Greenplum/Postgres.
      
      We already have coverage for cases involving returning stderr from
      segments and master to the user, and the command not found cases are not
      only redundant coverage, they are also brittle.
      
      This commit removes the test cases for command-not-found and updates the
      expected test output.
      139a065d
    • J
      Revert "Ignore differences between Ubuntu and Centos in gpcopy tests" · c1cac08c
      Jesse Zhang 提交于
      This reverts commit 6fed381d .
      c1cac08c
  3. 28 11月, 2017 7 次提交