1. 30 11月, 2017 2 次提交
  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 14 次提交
  4. 27 11月, 2017 8 次提交
    • H
      Remove unnecessary FIXME comment. · 7aa56476
      Heikki Linnakangas 提交于
      The code looks correct, pronargdefaults is in the fixed part of
      Form_pg_proc, so you don't need to use SysCacheGetAttr() to access it.
      7aa56476
    • H
      Resolve a few FIXMEs in JSON code, now that we have merged the features. · a27415db
      Heikki Linnakangas 提交于
      We have now merged user-defined I/O conversion casts, and
      SFRM_Materialize_Random, from PostgreSQL 8.4. We can change the JSON code
      that depended on those features to be identical to the upstream code now.
      a27415db
    • H
      18e0d3c8
    • H
      Code looks OK, remove FIXME comment. · 3ed86e06
      Heikki Linnakangas 提交于
      This FIXME comment was just to double-check that the code is correct. It
      looks good to me, so remove the comment.
      3ed86e06
    • H
    • H
      Port recent pg_dump changes to cdb_dump_agent. · d52e3573
      Heikki Linnakangas 提交于
      The window functions rewrite made some changes to pg_dump, to cope with the
      catalog changes. cdb_dump_agent is a heavily-modified copy of pg_dump, so
      it needs to be changed accordingly.
      d52e3573
    • H
      Merge with PostgreSQL 8.4devel, up to commit b0a6ad70. · 247bc7c1
      Heikki Linnakangas 提交于
      This is a small batch of commits, to just before the refactoring of the
      reloptions machinery. Stopping just before that, because merging that one
      requires a bit more work, to also refactor the GPDB parts.
      
      The bulk of this commit is uninteresting churn in the file headers, because
      the year in copyright notices was bumped from 2008 to 2009. But one notable
      change is the introduction of pg_stat_statements.
      247bc7c1
    • H
      Fix WAL-logging in RelationCreateStorage. · 908d1a14
      Heikki Linnakangas 提交于
      The condition was reversed - we should WAL-log the creation, if it's *not*
      a temporary relation. This was fixed in the upstream in commit 74ef810c,
      which we would merge soon anyway, but there are some complications in GPDB:
      
      In GPDB, this code in smgrcreate() to WAL-log the creation of a new
      relation had been removed. Instead, the caller of smgrcreate() calls other
      GPDB-specific functions to WAL-log the creation, as an MMXLOG_* record.
      But when we merged the relation forks stuff, which moved this code from
      smgr.c to storage.c, this code to WAL-log the creation of a new relation
      as an SMGR_CREATE record was resurrected. But it didn't actually do
      anything because the condition was reversed. Now that we're fixing the
      condition, we have to expxlicitly disable it.
      
      With the upcoming WAL replication work, we should WAL log it like in the
      upstream. (I haven't tested this with WAL replication enabled, though, so
      I'm not sure if we need to do something else, too, to make it actually
      work correctly.)
      908d1a14
  5. 25 11月, 2017 1 次提交
    • H
      Narrow race condition between pg_partitions view and altering partitions. · 6f91d994
      Heikki Linnakangas 提交于
      We have lately seen a lot of failures in test cases related to
      partitioning, with errors like this:
      
      select tablename, partitionlevel, partitiontablename, partitionname, partitionrank, partitionboundary from pg_partitions where tablename = 'mpp3079a';
      ERROR:  cache lookup failed for relation 148532 (ruleutils.c:7172)
      
      The culprit is that that the view passes a relation OID to the
      pg_get_partition_rule_def() function, and the function tries to perform a
      syscache lookup on the relation (in flatten_reloptions()), but the lookup
      fails because the relation was dropped concurrently by another transaction.
      This race is possible, because the query runs with an MVCC snapshot, but
      the syscache lookups use SnapshotNow.
      
      This commit doesn't eliminate the race completely, but at least it makes it
      narrower. A more reliable solution would've been to acquire a lock on the
      table, but then that might block, which isn't nice either.
      
      Another solution would've been to modify flatten_reloptions() to return
      NULL instead of erroring out, if the lookup fails. That approach is taken
      on the other lookups, but I'm reluctant to modify flatten_reloptions()
      because it's inherited from upstream. Let's see how well this works in
      practice first, before we do more drastic measures.
      6f91d994
  6. 24 11月, 2017 2 次提交
    • H
      Downgrade RANGE and ROWS to unreserved keywords. · d4f26c21
      Heikki Linnakangas 提交于
      In the upstream, these keywords are unreserved, and there's no reason they
      can't be unreserved in GPDB as well. Take the upstream grammar code to make
      that happen. Somehow I missed this in the big window functions rewrite.
      
      In the passing, also remove the useless 'opt_window_order_clause'
      production. It's identical to 'opt_sort_clause', and in the upstream, we
      use that directly as well.
      
      I bumped into this while looking at the next 8.4 commits we're about to
      merge. We're about to bring in pg_stat_statements, and a function used
      there has an output parameter called "rows", which doesn't work if it's
      a reserved keyword.
      d4f26c21
    • H
      Remove duplicated code. · 0876e434
      Heikki Linnakangas 提交于
      A mismerge. Surprisingly it worked despite the duplication. Although I
      think there may have been a memory leak, because of the duplicated
      MemoryContextSwitchTo call.
      0876e434