1. 28 Aug, 2014 2 commits
  2. 27 Aug, 2014 4 commits
    • Alvaro Herrera's avatar
      Fix FOR UPDATE NOWAIT on updated tuple chains · 1c9701cf
      Alvaro Herrera authored
      If SELECT FOR UPDATE NOWAIT tries to lock a tuple that is concurrently
      being updated, it might fail to honor its NOWAIT specification and block
      instead of raising an error.
      
      Fix by adding a no-wait flag to EvalPlanQualFetch which it can pass down
      to heap_lock_tuple; also use it in EvalPlanQualFetch itself to avoid
      blocking while waiting for a concurrent transaction.
      
      Authors: Craig Ringer and Thomas Munro, tweaked by Álvaro
      http://www.postgresql.org/message-id/51FB6703.9090801@2ndquadrant.com
      
      Per Thomas Munro in the course of his SKIP LOCKED feature submission,
      who also provided one of the isolation test specs.
      
      Backpatch to 9.4, because that's as far back as it applies without
      conflicts (although the bug goes all the way back).  To that branch also
      backpatch Thomas Munro's new NOWAIT test cases, committed in master by
      Heikki as commit 9ee16b49 .
      1c9701cf
    • Fujii Masao's avatar
      Add header comments to receivelog.h and streamutil.h. · 9a2d9489
      Fujii Masao authored
      This commit also adds the include guards to those header files.
      
      Michael Paquier
      9a2d9489
    • Stephen Frost's avatar
      Fix Var handling for security barrier views · e414ba93
      Stephen Frost authored
      In some cases, not all Vars were being correctly marked as having been
      modified for updatable security barrier views, which resulted in invalid
      plans (eg: when security barrier views were created over top of
      inheiritance structures).
      
      In passing, be sure to update both varattno and varonattno, as _equalVar
      won't consider the Vars identical otherwise.  This isn't known to cause
      any issues with updatable security barrier views, but was noticed as
      missing while working on RLS and makes sense to get fixed.
      
      Back-patch to 9.4 where updatable security barrier views were
      introduced.
      e414ba93
    • Peter Eisentraut's avatar
      doc: Document valid checkpoint_timeout range · 8e484bc4
      Peter Eisentraut authored
      Author: Fabien COELHO <coelho@cri.ensmp.fr>
      8e484bc4
  3. 26 Aug, 2014 14 commits
  4. 25 Aug, 2014 14 commits
  5. 24 Aug, 2014 1 commit
    • Tom Lane's avatar
      Fix another ancient memory-leak bug in relcache.c. · 73eba19a
      Tom Lane authored
      CheckConstraintFetch() leaked a cstring in the caller's context for each
      CHECK constraint expression it copied into the relcache.  Ordinarily that
      isn't problematic, but it can be during CLOBBER_CACHE testing because so
      many reloads can happen during a single query; so complicate the code
      slightly to allow freeing the cstring after use.  Per testing on buildfarm
      member barnacle.
      
      This is exactly like the leak fixed in AttrDefaultFetch() by commit
      078b2ed2.  (Yes, this time I did look for
      other instances of the same coding pattern :-(.)  Like that patch, no
      back-patch, since it seems unlikely that there's any problem except under
      very artificial test conditions.
      
      BTW, it strikes me that both of these places would require further work
      comparable to commit ab8c84db, if we ever
      supported defaults or check constraints on system catalogs: they both
      assume they are copying into an empty relcache data structure, and that
      conceivably wouldn't be the case during recursive reloading of a system
      catalog.  This does not seem worth worrying about for the moment, since
      there is no near-term prospect of supporting any such thing.  So I'll
      just note the possibility for the archives' sake.
      73eba19a
  6. 23 Aug, 2014 1 commit
    • Peter Eisentraut's avatar
      doc: Improve pg_restore help output · 256bfb2c
      Peter Eisentraut authored
      Add a note that some options can be specified multiple times to select
      multiple objects to restore.  This replaces the somewhat confusing use
      of plurals in the option descriptions themselves.
      256bfb2c
  7. 22 Aug, 2014 4 commits
    • Alvaro Herrera's avatar
      Implement ALTER TABLE .. SET LOGGED / UNLOGGED · f41872d0
      Alvaro Herrera authored
      This enables changing permanent (logged) tables to unlogged and
      vice-versa.
      
      (Docs for ALTER TABLE / SET TABLESPACE got shuffled in an order that
      hopefully makes more sense than the original.)
      
      Author: Fabrízio de Royes Mello
      Reviewed by: Christoph Berg, Andres Freund, Thom Brown
      Some tweaking by Álvaro Herrera
      f41872d0
    • Alvaro Herrera's avatar
      Fix outdated comment · 01d15a26
      Alvaro Herrera authored
      01d15a26
    • Tom Lane's avatar
      Fix corner-case behaviors in JSON/JSONB field extraction operators. · 41dd50e8
      Tom Lane authored
      Cause the path extraction operators to return their lefthand input,
      not NULL, if the path array has no elements.  This seems more consistent
      since the case ought to correspond to applying the simple extraction
      operator (->) zero times.
      
      Cause other corner cases in field/element/path extraction to return NULL
      rather than failing.  This behavior is arguably more useful than throwing
      an error, since it allows an expression index using these operators to be
      built even when not all values in the column are suitable for the
      extraction being indexed.  Moreover, we already had multiple
      inconsistencies between the path extraction operators and the simple
      extraction operators, as well as inconsistencies between the JSON and
      JSONB code paths.  Adopt a uniform rule of returning NULL rather than
      throwing an error when the JSON input does not have a structure that
      permits the request to be satisfied.
      
      Back-patch to 9.4.  Update the release notes to list this as a behavior
      change since 9.3.
      41dd50e8
    • Andres Freund's avatar
      Fix newly introduced misspelling of existence in pg_buffercache. · ebf20f65
      Andres Freund authored
      Peter Geoghegan
      ebf20f65