1. 07 Nov, 2017 3 commits
    • Simon Riggs's avatar
      Remove secondary checkpoint · 4b0d28de
      Simon Riggs authored
      Previously server reserved WAL for last two checkpoints,
      which used too much disk space for small servers.
      
      Bumps PG_CONTROL_VERSION
      
      Author: Simon Riggs <simon@2ndQuadrant.com>
      Reviewed-by: default avatarMichael Paquier <michael.paquier@gmail.com>
      4b0d28de
    • Simon Riggs's avatar
      Exclude pg_internal.init from BASE_BACKUP · 98267ee8
      Simon Riggs authored
      Add docs to explain this for other backup mechanisms
      
      Author: David Steele <david@pgmasters.net>
      Reviewed-by: Petr Jelinek <petr.jelinek@2ndQuadrant.com> et al
      98267ee8
    • Tom Lane's avatar
      Fix version numbering foulups exposed by 10.1. · d0c80c17
      Tom Lane authored
      configure computed PG_VERSION_NUM incorrectly.  (Coulda sworn I tested
      that logic back when, but it had an obvious thinko.)
      
      pg_upgrade had not been taught about the new dispensation with just
      one part in the major version number.
      
      Both things accidentally failed to fail with 10.0, but with 10.1 we
      got the wrong results.
      
      Per buildfarm.
      d0c80c17
  2. 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
  3. 05 Nov, 2017 3 commits
  4. 04 Nov, 2017 5 commits
  5. 03 Nov, 2017 7 commits
  6. 02 Nov, 2017 13 commits
  7. 01 Nov, 2017 4 commits
    • Tom Lane's avatar
      Allow bitmap scans to operate as index-only scans when possible. · 7c70996e
      Tom Lane authored
      If we don't have to return any columns from heap tuples, and there's
      no need to recheck qual conditions, and the heap page is all-visible,
      then we can skip fetching the heap page altogether.
      
      Skip prefetching pages too, when possible, on the assumption that the
      recheck flag will remain the same from one page to the next.  While that
      assumption is hardly bulletproof, it seems like a good bet most of the
      time, and better than prefetching pages we don't need.
      
      This commit installs the executor infrastructure, but doesn't change
      any planner cost estimates, thus possibly causing bitmap scans to
      not be chosen in cases where this change renders them the best choice.
      I (tgl) am not entirely convinced that we need to account for this
      behavior in the planner, because I think typically the bitmap scan would
      get chosen anyway if it's the best bet.  In any case the submitted patch
      took way too many shortcuts, resulting in too many clearly-bad choices,
      to be committable.
      
      Alexander Kuzmenkov, reviewed by Alexey Chernyshov, and whacked around
      rather heavily by me.
      
      Discussion: https://postgr.es/m/239a8955-c0fc-f506-026d-c837e86c827b@postgrespro.ru
      7c70996e
    • Peter Eisentraut's avatar
      doc: Mention pg_stat_wal_receiver in streaming replication docs · ec7ce542
      Peter Eisentraut authored
      Also make the link to pg_stat_replication more precise.
      
      Author: Michael Paquier <michael.paquier@gmail.com>
      Reviewed-by: default avatarJeff Janes <jeff.janes@gmail.com>
      ec7ce542
    • Tom Lane's avatar
      Fix ALTER TABLE code to update domain constraints when needed. · af20e2d7
      Tom Lane authored
      It's possible for dropping a column, or altering its type, to require
      changes in domain CHECK constraint expressions; but the code was
      previously only expecting to find dependent table CHECK constraints.
      Make the necessary adjustments.
      
      This is a fairly old oversight, but it's a lot easier to encounter
      the problem in the context of domains over composite types than it
      was before.  Given the lack of field complaints, I'm not going to
      bother with a back-patch, though I'd be willing to reconsider that
      decision if someone does complain.
      
      Patch by me, reviewed by Michael Paquier
      
      Discussion: https://postgr.es/m/30656.1509128130@sss.pgh.pa.us
      af20e2d7
    • Peter Eisentraut's avatar
      doc: Add to hot standby documentation · 387ec703
      Peter Eisentraut authored
      Document the order of changing certain settings when using hot-standby
      servers.  This is just a logical consequence of what was already
      documented, but it gives the users some more practical advice.
      
      Author: Yorick Peterse <yorickpeterse@gmail.com>
      Reviewed-by: default avatarAleksander Alekseev <a.alekseev@postgrespro.ru>
      Reviewed-by: default avatarRobert Haas <robertmhaas@gmail.com>
      387ec703