1. 23 11月, 2015 6 次提交
  2. 21 11月, 2015 3 次提交
    • A
      Avoid SEGV during backend initialization due to elog(ERROR). · a0eda0cb
      Asim Praveen 提交于
      This is fixed in PostgreSQL and I found parts of those fixes pulled in already.
      This commit pulls in the remnants.  The SEGV was found at a customer site
      where default_tablespace was configured for a role.  While new connections were
      made by the role, GRANT/REVOKE on the same tablespace was running concurrently.
      The assign hook for default_tablespace invoked elog(ERROR) but target for
      siglongjmp was not initialized, causing a segv and PANIC.
      
      Some unit tests had to be changed to accommodate the fix.
      
      Original commits from PostgreSQL:
      88f1fd29
      79ca7ffe
      a0eda0cb
    • C
      Add final table row count validation for gptransfer · f3f9b1ee
      Chumki Roy 提交于
      Currently GPtransfer has count validation which runs after every table transfer. It does not do any checking at the end of the transfer to the destination. Therefore it does not validate that the tables haven't changed in the meantime.
      
      To resolve the issue, an additional table row count validation has been added with all the existing validation options. This count validation does a final pass after the transfer is completely done to make sure the tables haven't changed in the meantime. Therefore, the default is to compare the row count of tables copied to the destination databases with the tables in the source database.
      
      Also an option '--no-final-count’ has beed introduced for users who do not want to run the final count validation by default. The option '--no-final-count’ will disable table row count validation that is performed after GPtransfer completes copying database objects to the target database.
      f3f9b1ee
    • X
      Bump optimizer version from 1.607 to 1.608. · aa53124b
      Xin Zhang 提交于
      aa53124b
  3. 20 11月, 2015 3 次提交
  4. 19 11月, 2015 5 次提交
    • H
      Fix the order of xmlagg test queries. · 135f9f2a
      Heikki Linnakangas 提交于
      The order the rows were being aggregated was not well-defined, even though
      I tried to add ORDER BYs to the queries. Putting the ORDER BY inside the
      aggregate does the trick.
      135f9f2a
    • H
      Merge commit 'd31ccb6c' into master · 44c86de0
      Heikki Linnakangas 提交于
      The most notable change in this batch is the XML support. We had already
      backported that, from PostgreSQL 9.1, but only the xpath parts. To bring
      this into a coherent state, I pulled *all* the XML code from PostgreSQL
      9.1, rather than merging the initial XML support from the early development
      of 8.3.
      
      Conflicts:
      	configure
      	configure.in
      	doc/FAQ_DEV
      	doc/TODO
      	doc/src/FAQ/FAQ_DEV.html
      	doc/src/FAQ/TODO.html
      	doc/src/sgml/catalogs.sgml
      	doc/src/sgml/datatype.sgml
      	doc/src/sgml/func.sgml
      	doc/src/sgml/installation.sgml
      	doc/src/sgml/libpq.sgml
      	src/backend/executor/execQual.c
      	src/backend/nodes/readfuncs.c
      	src/backend/optimizer/path/costsize.c
      	src/backend/optimizer/util/clauses.c
      	src/backend/parser/gram.y
      	src/backend/parser/keywords.c
      	src/backend/parser/parse_expr.c
      	src/backend/parser/parse_target.c
      	src/backend/utils/adt/Makefile
      	src/backend/utils/adt/ruleutils.c
      	src/backend/utils/adt/selfuncs.c
      	src/backend/utils/adt/xml.c
      	src/bin/psql/command.c
      	src/bin/psql/common.c
      	src/bin/psql/common.h
      	src/include/catalog/catversion.h
      	src/include/catalog/pg_am.h
      	src/include/catalog/pg_type.h
      	src/include/nodes/nodes.h
      	src/include/utils/errcodes.h
      	src/include/utils/xml.h
      	src/interfaces/libpq/fe-connect.c
      	src/test/regress/expected/opr_sanity.out
      	src/test/regress/expected/prepare.out
      	src/test/regress/expected/rules.out
      	src/test/regress/expected/xml.out
      	src/test/regress/parallel_schedule
      	src/test/regress/sql/opr_sanity.sql
      	src/test/regress/sql/xml.sql
      44c86de0
    • H
      Remove tidycat.pl machinery to specify the rowtype OID of catalog tables. · 99636d49
      Heikki Linnakangas 提交于
      The only reason we did that was to keep the OIDs the same across major
      version upgrades, because the old catalog upgrade mechanism relied on
      being able to read old catalog version with new binaries. We no longer try
      to maintain that property - future upgrades will use pg_upgrade or
      something similar that can deal with more drastic catalog changes.
      
      This allows removing the hacks in bootparse.y, toasting.c, and elsewhere,
      reducing the chance of merge conflicts in the future.
      99636d49
    • H
      Remove more upgrade machinery. · bdc1d880
      Heikki Linnakangas 提交于
      No need to force particular OIDs for these catalog tables.
      bdc1d880
    • H
      Remove gp_upgrade_mode and related machinery. · d9b60cd2
      Heikki Linnakangas 提交于
      The current plan is to use something like pg_upgrade for future in-place
      upgrades. The gpupgrade mechanism will not scale to the kind of drastic
      catalog and other data directory layout changes that are coming as we
      merge with later PostgreSQL releases.
      
      Kept gpupgrademirror for now. Need to check if there's some logic that's
      worth saving, for a possible pg_upgrade based solution later.
      d9b60cd2
  5. 18 11月, 2015 5 次提交
  6. 16 11月, 2015 6 次提交
    • H
      Merge commit '782d68e3'. · 1eddb30b
      Heikki Linnakangas 提交于
      This is the first merge commit in an effort to catch up with PostgreSQL 8.3.
      This batch corresponds to about two weeks worth of upstream commits from
      REL8_2_0, towards REL8_3_0.
      
      I changed the OID of int8dec function to 3546, as the old OID (2857) clashed
      with the new Postgres function, pg_stat_get_backend_xact_start. 3546 is used
      for int8dec in the upstream (9.3) anyway.
      
      Most of the conflicts below were trivial in nature, and I'm not sure if
      listing them in commit message is useful for anything, but doesn't hurt I
      guess..
      
      Conflicts:
      	configure
      	configure.in
      	contrib/hstore/hstore_op.c
      	contrib/tsearch2/dict_syn.c
      	doc/FAQ
      	doc/FAQ_AIX
      	doc/FAQ_HPUX
      	doc/FAQ_IRIX
      	doc/FAQ_MINGW
      	doc/FAQ_SCO
      	doc/FAQ_Solaris
      	doc/TODO
      	doc/src/FAQ/FAQ.html
      	doc/src/FAQ/TODO.html
      	doc/src/sgml/Makefile
      	doc/src/sgml/config.sgml
      	doc/src/sgml/docguide.sgml
      	doc/src/sgml/installation.sgml
      	doc/src/sgml/monitoring.sgml
      	doc/src/sgml/ref/psql-ref.sgml
      	doc/src/sgml/stylesheet-hh.xsl
      	doc/src/sgml/stylesheet.dsl
      	doc/src/sgml/stylesheet.xsl
      	doc/src/sgml/xfunc.sgml
      	src/backend/access/transam/xact.c
      	src/backend/access/transam/xlog.c
      	src/backend/catalog/system_views.sql
      	src/backend/executor/execMain.c
      	src/backend/executor/nodeLimit.c
      	src/backend/executor/spi.c
      	src/backend/nodes/copyfuncs.c
      	src/backend/nodes/equalfuncs.c
      	src/backend/nodes/outfuncs.c
      	src/backend/nodes/readfuncs.c
      	src/backend/optimizer/geqo/geqo_eval.c
      	src/backend/optimizer/path/joinrels.c
      	src/backend/optimizer/plan/initsplan.c
      	src/backend/optimizer/plan/subselect.c
      	src/backend/optimizer/util/joininfo.c
      	src/backend/parser/parse_agg.c
      	src/backend/port/win32/socket.c
      	src/backend/postmaster/pgstat.c
      	src/backend/tcop/Makefile
      	src/backend/tcop/postgres.c
      	src/backend/utils/adt/pgstatfuncs.c
      	src/backend/utils/misc/guc.c
      	src/bin/pg_controldata/pg_controldata.c
      	src/bin/pg_dump/win32.mak
      	src/bin/pg_resetxlog/pg_resetxlog.c
      	src/include/catalog/catversion.h
      	src/include/catalog/pg_control.h
      	src/include/executor/executor.h
      	src/include/nodes/execnodes.h
      	src/include/nodes/primnodes.h
      	src/include/optimizer/joininfo.h
      	src/include/pgstat.h
      	src/port/dirmod.c
      	src/template/linux
      	src/timezone/tznames/Asia.txt
      	src/timezone/tznames/Default
      1eddb30b
    • H
      Move GPDB-specific GUCs to separate file. · 69af7ce7
      Heikki Linnakangas 提交于
      This makes merging and diffing with upstream easier. There were so many
      GPDB-added GUCs in guc.c that "git merge" didn't handle it very well, and
      you easily got merge conflicts that were error-prone to fix manually.
      
      I kept a few GUCs in guc.c that are not present in REL8_2_0, because they
      were backported from later PostgreSQL versions, rather than being
      completely GPDB-specific.
      
      Clean up the diff between guc.c and upstream, by removing unnecessary
      includes, reordering a few GUCs to match upstream better, and similar
      cosmetic changes.
      
      I had to move MAX_KILOBYTES from guc.c to guc_tables.h, because guc_gp.c
      needs it too. I also had to export assign_msglvl() function from guc.c, so
      that it can be called from other assign_* functions from guc_gp.c. And I
      had to add the code to process the ConfigureNames*_gp arrays in addition
      to the upstream ones. These things increase the diff against upstream, but
      not by too much, IMHO. I also copy-pasted constants like MS_PER_S and
      KB_PER_MB, which seems safe as those are natural constants, and should
      never change.
      69af7ce7
    • Y
      add external table test to greenplum schedule · 5fbac8b6
      Yandong Yao 提交于
      5fbac8b6
    • Y
      add some basic external table tests · 58bbe3b8
      Yandong Yao 提交于
      58bbe3b8
    • Y
      remove useless comment in makefile · d2d723a9
      Yandong Yao 提交于
      d2d723a9
    • Y
      put gpfdist test code with source code · 87391c26
      Yandong Yao 提交于
      Move gpfdist regress cases 'exttab1' and 'custom_format' to extension/gpfdist
      directory.
      
      Enhance pg_regress to call needed perl scripts from correct directory.
      87391c26
  7. 14 11月, 2015 2 次提交
    • J
      Fixed pg_dumpall bugs relating to filespaces. · 9114c65f
      Jimmy Yih 提交于
        1) Short flags for output file and dumping filespaces were erroneously both assigned to -f.
           Dumping filespaces is now properly assigned to -F.
        2) Tablespaces were being dumped even when filespaces flag was not set.
           Now, tablespaces are only dumped when their corresponding filespaces are dumped.
      
      Authors: Jimmy Yih and James McAtamney
      9114c65f
    • V
      Bump up optimizer version to 1.607. · b572ba0e
      Venkatesh Raghavan 提交于
      b572ba0e
  8. 13 11月, 2015 7 次提交
    • P
      Merge pull request #54 from pengzhout/mpp-25956 · 8e2640ac
      pengzhout 提交于
      Fix brackets missing issue while describe views having ordered-set aggregates
      8e2640ac
    • M
      Submodule update to keep all urls consistent. · 3963fd8b
      Marbin Tan 提交于
      Closes #81
      3963fd8b
    • H
      In readfast.c/outfast.c, reuse functions from readfuncs.c/outfuncs.c. · a64174dd
      Heikki Linnakangas 提交于
      Currently, readfast.c / outfast.c are mostly copy-pasted from readfuncs.c /
      outfuncs.c. That's a merge hazard: if a new field is added to a struct in
      upstream, and it's added to readfuncs.c and outfuncs.c, we would need to
      manually do the same in the readfast.c/outfast.c. If the patch applies
      cleanly, we will not notice, and we'll have a bug of omission.
      
      Refactor the code so that all those node types where the text and binary
      functions are identical, the duplicate in [read/out]fast.c is removed, and
      the definition [read/out]funcs.c is used to compile the binary version too.
      This involves some tricks with #ifdefs and #includes, but cuts a lot of
      duplicate code. This should avoid the merge hazard.
      
      We'll still need to maintain the read/out functions whenever we modify a
      struct in Greenplum, but that's no different from what needs to be done in
      PostgreSQL.
      a64174dd
    • H
      Refactor _read functions in readfast.c to be more like readfuncs.c · b0b3bf2d
      Heikki Linnakangas 提交于
      This reduces the diff between readfast.c and readfuncs.c. There are
      of course parts of these files that need to be different, but the bulk
      of the functions should be identical, with all the differences hidden
      in the READ_* macros. This patch reduces the diff and thus makes any
      suspicious differences between them more obvious.
      b0b3bf2d
    • C
      Add gptransfer validation for missing filespaces on destination system · f46333e7
      Chumki Roy 提交于
      gptransfer currently does not validate whether required filespaces are missing on the destination system. If filespace does not exist, it fails and returns stack trace. It should return proper error message.
      
      Prior to doing a gptransfer, gptransfer will now validate filespaces on destination system and exit accordingly with the proper error message.
      f46333e7
    • J
      Fix gp_dump drop schema prior to create. · b761088f
      Jimmy Yih 提交于
      During a restore on a database without the related schemas (ex. --redirect
      to empty database) in which these schemas are set to be dropped, the SET
      search_path can be missing before the CREATE TABLE statements in the dump
      file. This results in tables being restored in the default schema instead
      of their expected schema.
      
      The main issue was that the ArchiveHandle->currSchema was not being reset
      when drop schema prior to create was requested in gp_dump. The
      ArchiveHandle->currSchema is now properly reset. This was originally fixed
      in upstream Postgres, and this commit just ports over that fix to gp_dump.
      b761088f
    • F
  9. 12 11月, 2015 3 次提交
    • H
      Move all function auto-generated lines from pg_proc.h to pg_proc_gp.h · 7774f0e7
      Heikki Linnakangas 提交于
      This splits pg_proc.h into two parts: pg_proc.h and pg_proc_gp.h. After the
      split, pg_proc.h contains functions we've inherited from upstream, and is
      mostly identical to the upstream version. This makes diffing and merging
      with upstream easier. All the upstream functions have been removed from
      pg_proc.sql, as they are no longer auto-generated. Instead of modifying
      pg_proc.h, catullus.pl is now used to create pg_proc_gp.h, which contains
      all the auto-generated DATA entries for the functions in pg_proc.sql.
      
      For the upstream-inherited DATA entries in pg_proc.h, remove the columns
      that are not present in upstream. This was needed again to make pg_proc.h
      closer to the upstream version. Also, remove auto-generated comments and
      revert whitespace changes compared to upstream.
      
      To compensate for the missing columns, introduce a new perl script,
      processs_col_defaults.pl that is run at build time, which adds the missing
      columns back to any DATA rows that miss them, before they are fed to
      genbki.sh. All the GPDB-added columns are annotated with a magic
      GPDB_COLUMN_DEFAULT() macro, similar to the CATALOG() and DATA() macros
      which tells process_col_defaults.pl what values to insert into the missing
      columns.
      
      Remove tidycat2 regression test. It tested that all the functions in
      pg_catalog came from pg_proc.sql, but that is no longer true. Only the
      GPDB-added ones are now in pg_proc.sql.
      7774f0e7
    • H
      Put back the out-function for PlannedStmt. · 35f25e89
      Heikki Linnakangas 提交于
      This partially reverts commit 4e01c159.
      The out-function for PlannedStmt is still needed, for debugging purposes,
      even though we never try to read them back in from text format. There is
      debug code in serializeNode that serializes a complete plan, and that
      gives a WARNING if there is no out-function for PlannedStmt. (I'm not
      convinced that code is doing much good, as it's only spewing stuff to the
      log under DEBUG5, and at that level it will just get lost in the noise.
      But that's a separate discussion). There is an out-function for
      PlannedStmt in PostgreSQL 9.3 too, which is where we it was backported
      from.
      
      While we're at it, take the opportunity to move _outPlannedStmt to the
      same location it's in in upstream, and remove spurious whitespace
      differences.
      35f25e89
    • P
      Remove duplicate entries in the Makefile · d7802928
      Pengcheng Tang 提交于
      d7802928