1. 27 Aug, 2014 2 commits
    • 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
  2. 26 Aug, 2014 14 commits
  3. 25 Aug, 2014 14 commits
  4. 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
  5. 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
  6. 22 Aug, 2014 7 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
    • Heikki Linnakangas's avatar
      Fix comment in pg_basebackup. · 2af93640
      Heikki Linnakangas authored
      The option is called --tablespace-mapping, not --tablespace.
      
      Amit Kapila
      2af93640
    • Heikki Linnakangas's avatar
      Change the way pg_basebackup's tablespace mapping is implemented. · 8d938eb0
      Heikki Linnakangas authored
      Previously, we would first create the symlinks the way they are in the
      original system, and at the end replace them with the mapped symlinks.
      That never really made much sense, so now we create the symlink pointing
      to the correct location to begin with, so that there's no need to fix
      them at the end.
      
      The old coding didn't work correctly on Windows, because Windows junction
      points look more like directories than files, and ought to be removed with
      rmdir rather than unlink. Also, it incorrectly used "%d" rather than "%u"
      to print an Oid, but that's gone now.
      
      Report and patch by Amit Kapila, with minor changes by me. Reviewed by
      MauMau. Backpatch to 9.4, where the --tablespace feature was added.
      8d938eb0
    • Peter Eisentraut's avatar
      Fix whitespace · 3feda1bc
      Peter Eisentraut authored
      3feda1bc
  7. 21 Aug, 2014 1 commit
    • Stephen Frost's avatar
      Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE' · 3c4cf080
      Stephen Frost authored
      As 'ALTER TABLESPACE .. MOVE ALL' really didn't change the tablespace
      but instead changed objects inside tablespaces, it made sense to
      rework the syntax and supporting functions to operate under the
      'ALTER (TABLE|INDEX|MATERIALIZED VIEW)' syntax and to be in
      tablecmds.c.
      
      Pointed out by Alvaro, who also suggested the new syntax.
      
      Back-patch to 9.4.
      3c4cf080