1. 10 Nov, 2017 5 commits
  2. 09 Nov, 2017 7 commits
  3. 08 Nov, 2017 6 commits
    • Tom Lane's avatar
      Allow --with-bonjour to work with non-macOS implementations of Bonjour. · 9b9cb3c4
      Tom Lane authored
      On macOS the relevant functions require no special library, but elsewhere
      we need to pull in libdns_sd.
      
      Back-patch to supported branches.  No docs change since the docs do not
      suggest that this is a Mac-only feature.
      
      Luke Lonergan
      
      Discussion: https://postgr.es/m/2D8331C5-D64F-44C1-8717-63EDC6EAF7EB@brightforge.com
      9b9cb3c4
    • Tom Lane's avatar
      Doc: fix erroneous example. · bd65e0c6
      Tom Lane authored
      The grammar requires these options to appear the other way 'round.
      
      jotpe@posteo.de
      
      Discussion: https://postgr.es/m/78933bd0-45ce-690e-b832-a328dd1a5567@posteo.de
      bd65e0c6
    • Tom Lane's avatar
      Fix two violations of the ResourceOwnerEnlarge/Remember protocol. · c5269472
      Tom Lane authored
      The point of having separate ResourceOwnerEnlargeFoo and
      ResourceOwnerRememberFoo functions is so that resource allocation
      can happen in between.  Doing it in some other order is just wrong.
      
      OpenTemporaryFile() did open(), enlarge, remember, which would leak the
      open file if the enlarge step ran out of memory.  Because fd.c has its own
      layer of resource-remembering, the consequences look like they'd be limited
      to an intratransaction FD leak, but it's still not good.
      
      IncrBufferRefCount() did enlarge, remember, incr-refcount, which would blow
      up if the incr-refcount step ever failed.  It was safe enough when written,
      but since the introduction of PrivateRefCountHash, I think the assumption
      that no error could happen there is pretty shaky.
      
      The odds of real problems from either bug are probably small, but still,
      back-patch to supported branches.
      
      Thomas Munro and Tom Lane, per a comment from Andres Freund
      c5269472
    • Peter Eisentraut's avatar
      Change TRUE/FALSE to true/false · 2eb4a831
      Peter Eisentraut authored
      The lower case spellings are C and C++ standard and are used in most
      parts of the PostgreSQL sources.  The upper case spellings are only used
      in some files/modules.  So standardize on the standard spellings.
      
      The APIs for ICU, Perl, and Windows define their own TRUE and FALSE, so
      those are left as is when using those APIs.
      
      In code comments, we use the lower-case spelling for the C concepts and
      keep the upper-case spelling for the SQL concepts.
      Reviewed-by: default avatarMichael Paquier <michael.paquier@gmail.com>
      2eb4a831
    • Peter Eisentraut's avatar
      Put markup in the right place · 4497f2f3
      Peter Eisentraut authored
      4497f2f3
    • Peter Eisentraut's avatar
      Expand empty end tag · 6e1e4c0d
      Peter Eisentraut authored
      6e1e4c0d
  4. 07 Nov, 2017 6 commits
  5. 06 Nov, 2017 5 commits
    • Tom Lane's avatar
      Last-minute updates for release notes. · 92d830f4
      Tom Lane authored
      Security: CVE-2017-12172, CVE-2017-15098, CVE-2017-15099
      92d830f4
    • Tom Lane's avatar
      Add tests for json{b}_populate_recordset() crash case. · b5742287
      Tom Lane authored
      The problem reported as CVE-2017-15098 was already resolved in HEAD by
      commit 37a795a6, but let's add the relevant test cases anyway.
      
      Michael Paquier and Tom Lane, per a report from David Rowley.
      
      Security: CVE-2017-15098
      b5742287
    • Noah Misch's avatar
      start-scripts: switch to $PGUSER before opening $PGLOG. · dfc015dc
      Noah Misch authored
      By default, $PGUSER has permission to unlink $PGLOG.  If $PGUSER
      replaces $PGLOG with a symbolic link, the server will corrupt the
      link-targeted file by appending log messages.  Since these scripts open
      $PGLOG as root, the attack works regardless of target file ownership.
      
      "make install" does not install these scripts anywhere.  Users having
      manually installed them in the past should repeat that process to
      acquire this fix.  Most script users have $PGLOG writable to root only,
      located in $PGDATA.  Just before updating one of these scripts, such
      users should rename $PGLOG to $PGLOG.old.  The script will then recreate
      $PGLOG with proper ownership.
      
      Reviewed by Peter Eisentraut.  Reported by Antoine Scemama.
      
      Security: CVE-2017-12172
      dfc015dc
    • Dean Rasheed's avatar
      Always require SELECT permission for ON CONFLICT DO UPDATE. · 87b2ebd3
      Dean Rasheed authored
      The update path of an INSERT ... ON CONFLICT DO UPDATE requires SELECT
      permission on the columns of the arbiter index, but it failed to check
      for that in the case of an arbiter specified by constraint name.
      
      In addition, for a table with row level security enabled, it failed to
      check updated rows against the table's SELECT policies when the update
      path was taken (regardless of how the arbiter index was specified).
      
      Backpatch to 9.5 where ON CONFLICT DO UPDATE and RLS were introduced.
      
      Security: CVE-2017-15099
      87b2ebd3
    • Noah Misch's avatar
      Add a temp-install prerequisite to "check"-like targets not having one. · c66b438d
      Noah Misch authored
      Makefile.global assigns this prerequisite to every target named "check",
      but similar targets must mention it explicitly.  Affected targets
      failed, tested $PATH binaries, or tested a stale temporary installation.
      The src/test/modules examples worked properly when called as "make -C
      src/test/modules/$FOO check", but "make -j" allowed the test to start
      before the temporary installation was in place.  Back-patch to 9.5,
      where commit dcae5fac introduced the
      shared temp-install.
      c66b438d
  6. 05 Nov, 2017 3 commits
  7. 04 Nov, 2017 5 commits
  8. 03 Nov, 2017 3 commits
    • Tom Lane's avatar
      Avoid looping through line pointers twice in PageRepairFragmentation(). · a9169f02
      Tom Lane authored
      There doesn't seem to be any good reason to do the filling of the
      itemidbase[] array separately from the first traversal of the pointers.
      It's certainly not a win if there are any line pointers with storage,
      and even if there aren't, this change doesn't insert code into the part
      of the first loop that will be traversed in that case.  So let's just
      merge the two loops.
      
      Yura Sokolov, reviewed by Claudio Freire
      
      Discussion: https://postgr.es/m/e49befcc6f1d7099834c6fdf5c675a60@postgrespro.ru
      a9169f02
    • Tom Lane's avatar
      Flag index metapages as standard-format in xlog.c calls. · 4c11d2c5
      Tom Lane authored
      btree, hash, and bloom indexes all set up their metapages in standard
      format (that is, with pd_lower and pd_upper correctly delimiting the
      unused area); but they mostly didn't inform the xlog routines of this.
      When calling log_newpage[_buffer], this is bad because it loses the
      opportunity to compress unused data out of the WAL record.  When
      calling XLogRegisterBuffer, it's not such a performance problem because
      all of these call sites also use REGBUF_WILL_INIT, preventing an FPI
      image from being written.  But it's still a good idea to provide the
      flag when relevant, because that aids WAL consistency checking.
      
      This completes the project of getting all the in-core index AMs to
      handle their metapage WAL operations similarly.
      
      Amit Kapila, reviewed by Michael Paquier
      
      Discussion: https://postgr.es/m/0d273805-0e9e-ec1a-cb84-d4da400b8f85@lab.ntt.co.jp
      4c11d2c5
    • Alvaro Herrera's avatar
      Fix thinkos in BRIN summarization · 1b890562
      Alvaro Herrera authored
      The previous commit contained a thinko that made a single-range
      summarization request process from there to end of table.  Fix by
      setting the correct end range point.  Per buildfarm.
      1b890562