1. 08 Oct, 2013 1 commit
  2. 07 Oct, 2013 7 commits
    • Heikki Linnakangas's avatar
      TYPEALIGN doesn't work on int64 on 32-bit platforms. · 5962519b
      Heikki Linnakangas authored
      The TYPEALIGN macro, and the related ones like MAXALIGN, don't work with
      values larger than intptr_t, because TYPEALIGN casts the argument to
      intptr_t to do the arithmetic. That's not a problem when dealing with
      pointers or lengths or offsets related to pointers, but the XLogInsert
      scaling patch added a call to MAXALIGN with an XLogRecPtr argument.
      
      To fix, add wider variants of the macros, called TYPEALIGN64 and MAXALIGN64,
      which are just like the existing variants but work with uint64 instead of
      intptr_t.
      
      Report and patch by David Rowley, analysis by Andres Freund.
      5962519b
    • Heikki Linnakangas's avatar
      Fix bugs in SSI tuple locking. · 81fbbfe3
      Heikki Linnakangas authored
      1. In heap_hot_search_buffer(), the PredicateLockTuple() call is passed
      wrong offset number. heapTuple->t_self is set to the tid of the first
      tuple in the chain that's visited, not the one actually being read.
      
      2. CheckForSerializableConflictIn() uses the tuple's t_ctid field
      instead of t_self to check for exiting predicate locks on the tuple. If
      the tuple was updated, but the updater rolled back, t_ctid points to the
      aborted dead tuple.
      
      Reported by Hannu Krosing. Backpatch to 9.1.
      81fbbfe3
    • Peter Eisentraut's avatar
      Translation updates · 0b109c82
      Peter Eisentraut authored
      0b109c82
    • Robert Haas's avatar
      Make DISCARD SEQUENCES also discard the last used sequence. · 16a906f5
      Robert Haas authored
      Otherwise, we access already-freed memory.  Oops.
      
      Report by Michael Paquier.  Fix by me.
      16a906f5
    • Robert Haas's avatar
      plpgsql: Add new option print_strict_params. · 689746c0
      Robert Haas authored
      This option provides more detailed error messages when STRICT is used
      and the number of rows returned is not one.
      
      Marko Tiikkaja, reviewed by Ian Lawrence Barwick
      689746c0
    • Kevin Grittner's avatar
      Eliminate xmin from hash tag for predicate locks on heap tuples. · c01262a8
      Kevin Grittner authored
      If a tuple was frozen while its predicate locks mattered,
      read-write dependencies could be missed, resulting in failure to
      detect conflicts which could lead to anomalies in committed
      serializable transactions.
      
      This field was added to the tag when we still thought that it was
      necessary to carry locks forward to a new version of an updated
      row.  That was later proven to be unnecessary, which allowed
      simplification of the code, but elimination of xmin from the tag
      was missed at the time.
      
      Per report and analysis by Heikki Linnakangas.
      Backpatch to 9.1.
      c01262a8
    • Andrew Dunstan's avatar
      Document support for VPATH builds of extensions. · 2e1cb733
      Andrew Dunstan authored
      Cédric Villemain and me.
      2e1cb733
  3. 06 Oct, 2013 2 commits
    • Noah Misch's avatar
      pgbench: Comment on thread timing hazards. · 7db0dc0e
      Noah Misch authored
      Reviewed by Fabien COELHO.
      7db0dc0e
    • Alvaro Herrera's avatar
      Fix various bugs in postmaster SIGKILL processing · bf261798
      Alvaro Herrera authored
      Clamp the minimum sleep time during immediate shutdown or crash to a
      minimum of zero, not a maximum of one second.  The previous code could
      result in a negative sleep time, leading to failure in select() calls.
      
      Also, on crash recovery, reset AbortStartTime as soon as SIGKILL is sent
      or abort processing has commenced instead of waiting until the startup
      process completes.  Reset AbortStartTime as soon as SIGKILL is sent,
      too, to avoid doing that repeatedly.
      
      Per trouble report from Jeff Janes on
      CAMkU=1xd3=wFqZwwuXPWe4BQs3h1seYo8LV9JtSjW5RodoPxMg@mail.gmail.com
      
      Author: MauMau
      bf261798
  4. 05 Oct, 2013 3 commits
    • Noah Misch's avatar
      pgbench: Elaborate latency reporting. · 2d6c0f10
      Noah Misch authored
      Isolate transaction latency (elapsed time between submitting first
      command and receiving response to last command) from client-side delays
      pertaining to the --rate schedule.  Under --rate, report schedule lag as
      defined in the documentation.  Report latency standard deviation
      whenever we collect the measurements to do so.  All of these changes
      affect --progress messages and the final report.
      
      Fabien COELHO, reviewed by Pavel Stehule.
      2d6c0f10
    • Noah Misch's avatar
      pgbench: Remove stray use of "float" math. · 8e00a385
      Noah Misch authored
      Oversight in commit 4a87f308.
      
      Fabien COELHO
      8e00a385
    • Bruce Momjian's avatar
      pg_upgrade doc: link mode additions · 85fa8293
      Bruce Momjian authored
      Mention that link mode uses less disk space, and uses junction points on
      Windows.
      
      Backpatch to 9.3.
      85fa8293
  5. 04 Oct, 2013 6 commits
  6. 03 Oct, 2013 5 commits
  7. 02 Oct, 2013 2 commits
  8. 01 Oct, 2013 3 commits
  9. 30 Sep, 2013 6 commits
  10. 29 Sep, 2013 2 commits
    • Andrew Dunstan's avatar
      Use a new hstore extension version for added json functions. · a1816751
      Andrew Dunstan authored
      This should have been done when the json functionality was added to
      hstore in 9.3.0. To handle this correctly, the upgrade script therefore
      uses conditional logic by using plpgsql in a DO statement to add the two
      new functions and the new cast. If hstore_to_json_loose is detected as
      already present and dependent on the hstore extension nothing is done.
      This will require that the database be loaded with plpgsql.
      
      People who have installed the earlier and spurious 1.1 version of hstore
      will need to do:
      
      	ALTER EXTENSION hstore UPDATE;
      
      to pick up the new functions properly.
      a1816751
    • Andrew Dunstan's avatar
      Ensure installation dirs are built before contents are installed. · d942f9d9
      Andrew Dunstan authored
      Cédric Villemain
      d942f9d9
  11. 26 Sep, 2013 3 commits
    • Robert Haas's avatar
      Allow printf-style padding specifications in log_line_prefix. · 4334639f
      Robert Haas authored
      David Rowley, after a suggestion from Heikki Linnakangas.  Reviewed by
      Albe Laurenz, and further edited by me.
      4334639f
    • Andrew Dunstan's avatar
      Fix erroneous statements about multiply specified JSON columns. · d70f8d5f
      Andrew Dunstan authored
      The behaviour in json_populate_record() and json_populate_recordset()
      was changed during development but the docs were not.
      d70f8d5f
    • Heikki Linnakangas's avatar
      Fix spurious warning after vacuuming a page on a table with no indexes. · adaba275
      Heikki Linnakangas authored
      There is a rare race condition, when a transaction that inserted a tuple
      aborts while vacuum is processing the page containing the inserted tuple.
      Vacuum prunes the page first, which normally removes any dead tuples, but
      if the inserting transaction aborts right after that, the loop after
      pruning will see a dead tuple and remove it instead. That's OK, but if the
      page is on a table with no indexes, and the page becomes completely empty
      after removing the dead tuple (or tuples) on it, it will be immediately
      marked as all-visible. That's OK, but the sanity check in vacuum would
      throw a warning because it thinks that the page contains dead tuples and
      was nevertheless marked as all-visible, even though it just vacuumed away
      the dead tuples and so it doesn't actually contain any.
      
      Spotted this while reading the code. It's difficult to hit the race
      condition otherwise, but can be done by putting a breakpoint after the
      heap_page_prune() call.
      
      Backpatch all the way to 8.4, where this code first appeared.
      adaba275