1. 23 9月, 2016 2 次提交
    • S
      Validate persistent information in relcache entry. · fe39e7eb
      Shoaib Lari 提交于
      We have observed that the persistent TID and serial number associated with a
      relfilenode in a relation descriptor may be updated to a new value before
      relfilenode is updated.  If an XLog record is written with such a relation
      descriptor, then the XLog record fails to apply during recovery.
      
      This commit adds a check to validate sanity of persistent information in a
      relation descriptor by fetching persistent information using relfilenode from
      gp_relation_node.
      
      The validation is controlled by a new GUC, gp_validate_pt_info_relcache.
      fe39e7eb
    • S
      Expose UDF in a view to retrieve workfiles used diskspace (#1142) · e5f1b9f7
      Shreedhar Hardikar 提交于
      [#130666969]
      Internally this is the shared memory variable used_segspace in
      the view gp_toolkit.gp_workfile_mgr_used_diskspace.
      Signed-off-by: NXin Zhang <xzhang@pivotal.io>
      e5f1b9f7
  2. 21 9月, 2016 1 次提交
  3. 20 9月, 2016 7 次提交
  4. 19 9月, 2016 4 次提交
  5. 18 9月, 2016 1 次提交
  6. 17 9月, 2016 2 次提交
  7. 16 9月, 2016 11 次提交
  8. 15 9月, 2016 2 次提交
  9. 14 9月, 2016 3 次提交
  10. 13 9月, 2016 7 次提交
    • D
      Perform rudimentary style cleanups · 3482d016
      Daniel Gustafsson 提交于
      Clean up some whitespace issues, correct spelling in comments, move
      bracing to be uniform with codebase style (as well the lions part of
      this file) and remove dead commented out code.
      3482d016
    • D
      Avoid dereferencing NULL file pointer after url_fclose() · 6f10fd73
      Daniel Gustafsson 提交于
      The file pointer is being freed by url_fclose() so we must copy the
      members of the struct we need for error reporting before invoking,
      the current coding causes a NULL pointer dereference.
      
      Reported by Coverity scanning.
      6f10fd73
    • D
      Handle new ereport() macro in yy_fatal_error() · 85af8f50
      Daniel Gustafsson 提交于
      The ereport() macro will now expand to a do { .. } while(0); type
      construction which is incompatible with (void) casting of fprintf()
      done in yy_fatal_error() by default. Add a level of indirection to
      cope with the new construction.
      85af8f50
    • D
      Fix elog() invocations to match new macro definition · 10a26f7e
      Daniel Gustafsson 提交于
      The elog() calls will now be expanded into a do {..} while(0); type
      construction, fix up calls which were incompatible with this.
      10a26f7e
    • R
      Catch fatal flex errors in the GUC file lexer. · 932b1e58
      Robert Haas 提交于
      This prevents the postmaster from unexpectedly croaking if postgresql.conf
      contains something like:
      
      include 'invalid_directory_name'
      
      Noah Misch. Reviewed by Tom Lane and myself.
      
      Conflicts with GPDB code:
      	src/backend/utils/misc/guc-file.l
      932b1e58
    • T
      Improve handling of ereport(ERROR) and elog(ERROR). · 00067d50
      Tom Lane 提交于
      In commit 71450d7f, we added code to inform
      suitably-intelligent compilers that ereport() doesn't return if the elevel
      is ERROR or higher.  This patch extends that to elog(), and also fixes a
      double-evaluation hazard that the previous commit created in ereport(),
      as well as reducing the emitted code size.
      
      The elog() improvement requires the compiler to support __VA_ARGS__, which
      should be available in just about anything nowadays since it's required by
      C99.  But our minimum language baseline is still C89, so add a configure
      test for that.
      
      The previous commit assumed that ereport's elevel could be evaluated twice,
      which isn't terribly safe --- there are already counterexamples in xlog.c.
      On compilers that have __builtin_constant_p, we can use that to protect the
      second test, since there's no possible optimization gain if the compiler
      doesn't know the value of elevel.  Otherwise, use a local variable inside
      the macros to prevent double evaluation.  The local-variable solution is
      inferior because (a) it leads to useless code being emitted when elevel
      isn't constant, and (b) it increases the optimization level needed for the
      compiler to recognize that subsequent code is unreachable.  But it seems
      better than not teaching non-gcc compilers about unreachability at all.
      
      Lastly, if the compiler has __builtin_unreachable(), we can use that
      instead of abort(), resulting in a noticeable code savings since no
      function call is actually emitted.  However, it seems wise to do this only
      in non-assert builds.  In an assert build, continue to use abort(), so that
      the behavior will be predictable and debuggable if the "impossible"
      happens.
      
      These changes involve making the ereport and elog macros emit do-while
      statement blocks not just expressions, which forces small changes in
      a few call sites.
      
      Andres Freund, Tom Lane, Heikki Linnakangas
      
      Conflicts with GPDB codebase:
      	config/c-compiler.m4
      	configure
      	configure.in
      	contrib/cube/cubescan.l
      	contrib/seg/segscan.l
      	src/include/pg_config.h.in
      	src/include/pg_config.h.win32
      00067d50
    • P
      Teach compiler that ereport(>=ERROR) does not return · c73dec0f
      Peter Eisentraut 提交于
      When elevel >= ERROR, we add an abort() call to the ereport() macro to
      give the compiler a hint that the ereport() expansion will not return,
      but the abort() isn't actually reached because the longjmp happens in
      errfinish().
      
      Because the effect of ereport() varies with the elevel, we cannot use
      standard compiler attributes such as noreturn for this.
      c73dec0f