1. 06 Sep, 2017 3 commits
    • Peter Eisentraut's avatar
      Escape < and & in SGML · 1c53f612
      Peter Eisentraut authored
      This is not required in SGML, but will be in XML, so this is a step to
      prepare for the conversion to XML.  (It is still not required to escape
      >, but we did it here in some cases for symmetry.)
      
      Add a command-line option to osx/onsgmls calls to warn about unescaped
      occurrences in the future.
      
      Author: Alexander Law <exclusion@gmail.com>
      Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
      1c53f612
    • Tom Lane's avatar
      Clean up handling of dropped columns in NAMEDTUPLESTORE RTEs. · 8689e382
      Tom Lane authored
      The NAMEDTUPLESTORE patch piggybacked on the infrastructure for
      TABLEFUNC/VALUES/CTE RTEs, none of which can ever have dropped columns,
      so the possibility was ignored most places.  Fix that, including adding a
      specification to parsenodes.h about what it's supposed to look like.
      
      In passing, clean up assorted comments that hadn't been maintained
      properly by said patch.
      
      Per bug #14799 from Philippe Beaudoin.  Back-patch to v10.
      
      Discussion: https://postgr.es/m/20170906120005.25630.84360@wrigleys.postgresql.org
      8689e382
    • Peter Eisentraut's avatar
      doc: Clarify pg_inherits description · 0b554e4e
      Peter Eisentraut authored
      Reported-by: mjustin.lists@gmail.com
      0b554e4e
  2. 05 Sep, 2017 12 commits
  3. 04 Sep, 2017 4 commits
    • Tom Lane's avatar
      Be more careful about newline-chomping in pgbench. · 0b707d6e
      Tom Lane authored
      process_backslash_command would drop the last character of the input
      command on the assumption that it was a newline.  Given a non newline
      terminated input file, this could result in dropping the last character
      of the command.  Fix that by doing an actual test that we're removing
      a newline.
      
      While at it, allow for Windows newlines (\r\n), and suppress multiple
      newlines if any.  I do not think either of those cases really occur,
      since (a) we read script files in text mode and (b) the lexer stops
      when it hits a newline.  But it's cheap enough and it provides a
      stronger guarantee about what the result string looks like.
      
      This is just cosmetic, I think, since the possibly-overly-chomped
      line was only used for display not for further processing.  So
      it doesn't seem necessary to back-patch.
      
      Fabien Coelho, reviewed by Nikolay Shaplov, whacked around a bit by me
      
      Discussion: https://postgr.es/m/alpine.DEB.2.20.1704171422500.4025@lancre
      0b707d6e
    • Tom Lane's avatar
      Fix some subtle problems in pgbench transaction stats counting. · c23bb6ba
      Tom Lane authored
      With --latency-limit, transactions might get skipped even beyond the
      transaction count limit specified by -t, throwing off the expected
      number of transactions and thus the denominator for later stats.
      Be sure to stop skipping transactions once -t is reached.
      
      Also, include skipped transactions in the "cnt" fields; this requires
      discounting them again in a couple of places, but most places are
      better off with this definition.  In particular this is needed to
      get correct overall stats for the combination of -R/-L/-t options.
      Merge some more processing into processXactStats() to simplify this.
      
      In passing, add a check that --progress-timestamp is specified only
      when --progress is.
      
      We might consider back-patching this, but given that it only matters
      for a combination of options, and given the lack of field complaints,
      consensus seems to be not to bother.
      
      Fabien Coelho, reviewed by Nikolay Shaplov
      
      Discussion: https://postgr.es/m/alpine.DEB.2.20.1704171422500.4025@lancre
      c23bb6ba
    • Tom Lane's avatar
      Adjust pgbench to allow non-ASCII characters in variable names. · 9d36a386
      Tom Lane authored
      This puts it in sync with psql's notion of what is a valid variable name.
      Like psql, we document that "non-Latin letters" are allowed, but actually
      any non-ASCII character is accepted.
      
      Fabien Coelho
      
      Discussion: https://postgr.es/m/20170405.094548.1184280384967203518.t-ishii@sraoss.co.jp
      9d36a386
    • Alvaro Herrera's avatar
  4. 03 Sep, 2017 2 commits
  5. 02 Sep, 2017 1 commit
  6. 01 Sep, 2017 17 commits
  7. 31 Aug, 2017 1 commit
    • Tom Lane's avatar
      Avoid memory leaks when a GatherMerge node is rescanned. · 2d44c58c
      Tom Lane authored
      Rescanning a GatherMerge led to leaking some memory in the executor's
      query-lifespan context, because most of the node's working data structures
      were simply abandoned and rebuilt from scratch.  In practice, this might
      never amount to much, given the cost of relaunching worker processes ---
      but it's still pretty messy, so let's fix it.
      
      We can rearrange things so that the tuple arrays are simply cleared and
      reused, and we don't need to rebuild the TupleTableSlots either, just
      clear them.  One small complication is that because we might get a
      different number of workers on each iteration, we can't keep the old
      convention that the leader's gm_slots[] entry is the last one; the leader
      might clobber a TupleTableSlot that we need for a worker in a future
      iteration.  Hence, adjust the logic so that the leader has slot 0 always,
      while the active workers have slots 1..n.
      
      Back-patch to v10 to keep all the existing versions of nodeGatherMerge.c
      in sync --- because of the renumbering of the slots, there would otherwise
      be a very large risk that any future backpatches in this module would
      introduce bugs.
      
      Discussion: https://postgr.es/m/8670.1504192177@sss.pgh.pa.us
      2d44c58c