1. 16 1月, 2019 15 次提交
  2. 15 1月, 2019 13 次提交
    • W
      Assign plan_node_id for ModifyTable, MergeAppend (#6695) · 82fb3b5a
      Wang Hao 提交于
      Some plan node types such as ModifyTable or MergeAppend is not covered in assign_plannode_id(), leads children nodes of them are not assigned with proper plan_node_id. The plan_node_id is required by gpmon and instrument for monitoring purpose, without proper plan_node_id assigned, the consistency of monitoring data will be broken.
      
      This commit refactor assign_plannode_id() to use plan_tree_walker. As a result, ModifyTable, MergeAppend and potentially Sequence are covered. Another advantage of using plan_tree_walker is when new types are introduced, we don't need to take care of assign_plannode_id anymore, plan_tree_walker should do that.
      
      Fixes https://github.com/greenplum-db/gpdb/issues/5247Reviewed-by: NNing Yu <nyu@pivotal.io>
      Reviewed-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
      82fb3b5a
    • H
      Detach postmaster process from pg_ctl's session at server startup. · ec535897
      Heikki Linnakangas 提交于
      The PostgreSQL 9.2 merge added a setsid() call to postmaster.c,
      to work around issues on killing the regression tests. But that
      introduced problems of its own. If you started postmaster directly from the
      command line, with something like "postgres -D datadir", it would fail with:
      
      ERROR: setsid() failed: Operation not permitted (postmaster.c:1025)
      
      Another symptom was that I was not able to kill the server with CTRL-C,
      in the little bash script I use to launch the server. My bash script
      simply launches all the servers with:
      
          #!/bin/bash
          postmaster -D data-seg0 &
          postmaster -D data-seg1 &
          postmaster -D data-seg2 &
          postmaster -D data-master
      
      Commit message from the change on the 9.2 merge branch that
      introduced the setsid() call:
      
      commit ef0cb844c87d8b9769b98a20ca66ecda00620604
      Author: Paul Guo <paulguo@gmail.com>
      Date:   Fri Jul 27 18:11:31 2018 +0800
      
          Set up a new session group in postmaster.
      
          Without this patch, pressing ctrl+c to terminate regression tests
          could always cause master processes down if master is identical as client.
      
          This issue 100% happens after running into tests in greenplum_schedule.
          It is because the first test case instr_in_shmem_setup in
          greenplum_schedule restarts the cluster, however without this patch,
          when we press ctrl+c to terminate testing, SIGINT will
          be delivered to postmaster process also.
      
          This issue does not happen on gpdb master at this moment due to
          the existence of pmdaemonize() which was removed in PG 9.2, and
          since the logic on PG seems to be never changed since 9.2 it
          happens on PG master also.
      
          Not sure how PG upstream thinks about this, but I'm checking in
          this patch at first since this really affect development.
      
      This was really a problem in PostgreSQL, too, but no one had noticed or
      complained about it. After discussion on pgsql-hackers, it was fixed by
      this upstream commit:
      
      commit bb24439c
      Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
      Date:   Mon Jan 14 14:50:58 2019 +0200
      
          Detach postmaster process from pg_ctl's session at server startup.
      
          pg_ctl is supposed to daemonize the postmaster process, so that it's not
          affected by signals to the launching process group.  Before this patch, if
          you had a shell script that used "pg_ctl start", and you interrupted the
          shell script after postmaster had been launched, postmaster was also
          killed.  To fix, call setsid() after forking the postmaster process.
      
          Long time ago, we had a 'silent_mode' option, which daemonized the
          postmaster process by calling setsid(), but that was removed back in 2011
          (commit f7ea6bea).  We discussed bringing that back in some form, but
          pg_ctl is the documented way of launching postmaster to the background, so
          putting the setsid() call in pg_ctl itself seems appropriate.
      
          Just putting postmaster in a separate session would change the behavior
          when you interrupt "pg_ctl -w start", e.g. with CTRL-C, while it's waiting
          for postmaster to start.  The historical behavior has been that
          interrupting pg_ctl aborts the server launch, which is handy if the server
          is stuck in recovery, for example, and won't fully start up.  To keep that
          behavior, install a signal handler in pg_ctl, to explicitly kill
          postmaster, if pg_ctl is interrupted while it's waiting for the server to
          start up.  This isn't 100% watertight, there is a small window after
          forking the postmaster process, where the signal handler doesn't know the
          postmaster's PID yet, but seems good enough.
      
          Arguably this is a long-standing bug, but I refrained from back-batching,
          out of fear of breaking someone's scripts that depended on the old
          behavior.
      
          Reviewed by Tom Lane.  Report and original patch by Paul Guo, with
          feedback from Michael Paquier.
      
          Discussion: https://www.postgresql.org/message-id/CAEET0ZH5Bf7dhZB3mYy8zZQttJrdZg_0Wwaj0o1PuuBny1JkEw%40mail.gmail.com
      
      This commit reverts the new setsid() call that was added during the 9.2
      merge, and backports that upstream fix, instead.
      ec535897
    • H
      Remove dependency of test AIX to release candidate (#6656) · f9beed05
      Huiliang.liu 提交于
      The AIX server in not available, so we remove the test job to
      release candidate. This is temp change until the server is available.
      f9beed05
    • Y
      Fix incorrect comments and remove unused code (#6704) · e62c1e40
      Yandong Yao 提交于
      e62c1e40
    • B
      Bump ORCA to v3.21 · d49ab45e
      Bhuvnesh Chaudhary 提交于
      d49ab45e
    • B
      Bump ORCA to v3.20 · 2118a7c8
      Bhuvnesh Chaudhary 提交于
      2118a7c8
    • H
      Fix memory accounting owner type used for RecursiveUnions. · 11110be4
      Heikki Linnakangas 提交于
      Copy-pasto, spotted while reading the code. I don't know what consequences
      the wrong owner type would have.
      11110be4
    • A
      Bring WITH_MIRRORS=false walrep tests into regular ICW. · 5f8c3cbc
      Ashwin Agrawal 提交于
      These tests were run in separate job before as needed cluster to be created for
      them with no mirrors. These could run only without mirrors due to limitation of
      allowing only one walsender-walreceiver connection (max_walsender=1). But now
      that restriction no more exists, can run these tests similar to any other tests
      as part of regular ICW even if cluster is created with mirror.
      5f8c3cbc
    • A
      Simplify is_mirror_up() and GetMirrorStatus(). · 19fead7a
      Ashwin Agrawal 提交于
      19fead7a
    • A
      2a820ee0
    • K
    • M
      docs - migrate using gpcopy- remove same number of source, dest. host… (#6660) · 08676bab
      Mel Kiyama 提交于
      * docs - migrate using gpcopy- remove same number of source, dest. hosts restriction.
      
      * docs - migrate using gpcopy- updates based on review comments.
      08676bab
    • K
      Use ccp image for running terraform tests · 33dd2261
      Karen Huddleston 提交于
      The concourse container for terraform tests is only used to ssh to the
      terraform cluster so we can use a lighter weight image.
      
      Note: regression_tests_gphdfs_mapr_centos does not use the ccp image
      because it runs tests and GPDB from the Concourse container, and uses a
      terraform host to run hadoop/mapr
      Co-authored-by: NKaren Huddleston <khuddleston@pivotal.io>
      Co-authored-by: NDavid Sharp <dsharp@pivotal.io>
      33dd2261
  3. 14 1月, 2019 4 次提交
    • H
      Set client_encoding to match DB encoding in QD->QE connections. · a6c9b436
      Heikki Linnakangas 提交于
      QE processes largely don't care about client_encoding, because query
      results are sent through the interconnect, except for a few internal
      commands, and the query text is presumed to already be in the database
      encoding, in QD->QE messages.
      
      But there were a couple of cases where it mattered. Error messages
      generated in QEs were being converted to client_encoding, but QD assumed
      that they were in server encoding.
      
      Now that the QEs don't know the user's client_encoding, COPY TO needs
      changes. In COPY TO, the QEs are responsible for forming the rows in the
      final cilent_encoding, so the QD now needs to explicitly use the COPY's
      ENCODING option, when it dispatches the COPY to QEs.
      
      The COPY TO handling wasn't quite right, even before this patch. It showed
      up as regression failure in the src/test/mb/mbregress.sh 'sjis' test. When
      client_encoding was set with the PGCLIENTENCODING, however, it wasn't set
      correctly in the QEs, which showed up as incorrectly encoded COPY output.
      Now that we always set it to match the database encoding in QEs, that's
      moot.
      
      While we're at it, change the mbregress test so that it's not sensitive to
      row orderings. And make atmsort.pm more lenient, to recognize "COPY
      <tablename> TO STDOUT", even when the tablename contains non-ascii
      characters. These changes were needed to make the src/test/mb/ tests pass
      cleanly.
      
      Fixes https://github.com/greenplum-db/gpdb/issues/5241.
      
      Discussion: https://groups.google.com/a/greenplum.org/d/msg/gpdb-dev/WPmHXuU9T94/gvpNOE73FwAJReviewed-by: NPengzhou Tang <ptang@pivotal.io>
      a6c9b436
    • R
      Revise min_lefthand/min_righthand in SpecialJoinInfo for LASJ. · 58b3ad3d
      Richard Guo 提交于
      Previously, we did not consider LASJ when calculating the minimum sets
      of Relids required on each side of the join to form the outer join. As a
      result, the min_lefthand/min_righthand for LASJ was not correct.
      
      One of the consequences is that join_is_legal() works incorrectly for
      some queries, such as
      
      	select * from a where a.i not in
      		(select b.i from b left join c on b.i = c.i);
      
      For this query, join_is_legal() treats the join of Rel B and C as being
      illegal, because the min_righthand of the LASJ includes only B, rather
      than B and C. That would make us fail to find any legal join order and
      end up with "ERROR:  failed to build any 2-way joins".
      
      This patch revises min_lefthand/min_righthand in SpecialJoinInfo for
      LASJ. It also removes the FIXME in join_is_legal(), which is an ugly
      workaround to make the query above work.
      Reviewed-by: NMelanie Plageman <mplageman@pivotal.io>
      58b3ad3d
    • S
      Remove unused variable and unused functions (#6669) · 4366e73c
      Shaoqi Bai 提交于
      4366e73c
    • S
      Remove GPDB_94_STABLE_MERGE_FIXME (#6684) · fda5fb09
      Shaoqi Bai 提交于
      When we ignore the nextOid counter in an ONLINE checkpoint, can also
      remove nextRelfilenode, even if there is a collision about same
      relfilenode, the logic around calling GpCheckRelFileCollision, would
      choose another different relfilenode, should be no harm
      fda5fb09
  4. 12 1月, 2019 5 次提交
  5. 11 1月, 2019 3 次提交