1. 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
  2. 04 Oct, 2013 6 commits
  3. 03 Oct, 2013 5 commits
  4. 02 Oct, 2013 2 commits
  5. 01 Oct, 2013 3 commits
  6. 30 Sep, 2013 6 commits
  7. 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
  8. 26 Sep, 2013 4 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
    • Noah Misch's avatar
      pgbench: Correct for bias in --rate schedule generation. · c2df45a3
      Noah Misch authored
      Previous code gave a mean delay 0.44% below target.  This change also
      has the effect of increasing the maximum possible delay.
      
      Fabien COELHO
      c2df45a3
  9. 25 Sep, 2013 1 commit
    • Heikki Linnakangas's avatar
      Plug memory leak in range_cmp function. · 77ae7f7c
      Heikki Linnakangas authored
      B-tree operators are not allowed to leak memory into the current memory
      context. Range_cmp leaked detoasted copies of the arguments. That caused
      a quick out-of-memory error when creating an index on a range column.
      
      Reported by Marian Krucina, bug #8468.
      77ae7f7c
  10. 24 Sep, 2013 1 commit
  11. 23 Sep, 2013 7 commits
    • Noah Misch's avatar
      Use @libdir@ in both of regress/{input,output}/security_label.source · b43b64ca
      Noah Misch authored
      Though @libdir@ almost always matches @abs_builddir@ in this context,
      the test could only fail if they differed.  Back-patch to 9.1, where the
      test was introduced.
      
      Hamid Quddus Akhtar
      b43b64ca
    • Noah Misch's avatar
      pgbench: Tweak documentation. · 825da2ab
      Noah Misch authored
      Fabien COELHO
      825da2ab
    • Robert Haas's avatar
      doc: Clarify that file_fdw options require values. · 54990af6
      Robert Haas authored
      Mike Blackwell and Robert Haas
      54990af6
    • Robert Haas's avatar
      Don't allow system columns in CHECK constraints, except tableoid. · ba3d39c9
      Robert Haas authored
      Previously, arbitray system columns could be mentioned in table
      constraints, but they were not correctly checked at runtime, because
      the values weren't actually set correctly in the tuple.  Since it
      seems easy enough to initialize the table OID properly, do that,
      and continue allowing that column, but disallow the rest unless and
      until someone figures out a way to make them work properly.
      
      No back-patch, because this doesn't seem important enough to take the
      risk of destabilizing the back branches.  In fact, this will pose a
      dump-and-reload hazard for those upgrading from previous versions:
      constraints that were accepted before but were not correctly enforced
      will now either be enforced correctly or not accepted at all.  Either
      could result in restore failures, but in practice I think very few
      users will notice the difference, since the use case is pretty
      marginal anyway and few users will be relying on features that have
      not historically worked.
      
      Amit Kapila, reviewed by Rushabh Lathia, with doc changes by me.
      ba3d39c9
    • Bruce Momjian's avatar
      pg_upgrade: more C comment fixes · ff2a1f5e
      Bruce Momjian authored
      ff2a1f5e
    • Bruce Momjian's avatar
      pg_upgrade: fix C comment typo · f7cf5fa2
      Bruce Momjian authored
      f7cf5fa2
    • Stephen Frost's avatar
      Fix SSL deadlock risk in libpq · b37c90f1
      Stephen Frost authored
      In libpq, we set up and pass to OpenSSL callback routines to handle
      locking.  When we run out of SSL connections, we try to clean things
      up by de-registering the hooks.  Unfortunately, we had a few calls
      into the OpenSSL library after these hooks were de-registered during
      SSL cleanup which lead to deadlocking.  This moves the thread callback
      cleanup to be after all SSL-cleanup related OpenSSL library calls.
      I've been unable to reproduce the deadlock with this fix.
      
      In passing, also move the close_SSL call to be after unlocking our
      ssl_config mutex when in a failure state.  While it looks pretty
      unlikely to be an issue, it could have resulted in deadlocks if we
      ended up in this code path due to something other than SSL_new
      failing.  Thanks to Heikki for pointing this out.
      
      Back-patch to all supported versions; note that the close_SSL issue
      only goes back to 9.0, so that hunk isn't included in the 8.4 patch.
      
      Initially found and reported by Vesa-Matti J Kari; many thanks to
      both Heikki and Andres for their help running down the specific
      issue and reviewing the patch.
      b37c90f1