Skip to content
Snippets Groups Projects
  1. Nov 11, 2017
  2. Nov 10, 2017
  3. Nov 09, 2017
  4. Nov 08, 2017
    • Tom Lane's avatar
      Allow --with-bonjour to work with non-macOS implementations of Bonjour. · 58bc9ea0
      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
      58bc9ea0
    • Tom Lane's avatar
      Doc: fix erroneous example. · 6c05b815
      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
      6c05b815
    • Tom Lane's avatar
      Fix two violations of the ResourceOwnerEnlarge/Remember protocol. · 442bc416
      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
      442bc416
  5. Nov 07, 2017
    • Tom Lane's avatar
      Fix unportable usage of <ctype.h> functions. · e836502d
      Tom Lane authored
      isdigit(), isspace(), etc are likely to give surprising results if passed a
      signed char.  We should always cast the argument to unsigned char to avoid
      that.  Error in commit 63d6b97f, found by buildfarm member gaur.
      Back-patch to 9.3, like that commit.
      e836502d
    • Tom Lane's avatar
      Fix version numbering foulups exposed by 10.1. · 958fe549
      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.
  6. Nov 06, 2017
    • Tom Lane's avatar
      Stamp 10.1. · 0b35d54c
      Tom Lane authored
      0b35d54c
    • Tom Lane's avatar
      Last-minute updates for release notes. · 50abeafc
      Tom Lane authored
      Security: CVE-2017-12172, CVE-2017-15098, CVE-2017-15099
      50abeafc
    • Tom Lane's avatar
      Make json{b}_populate_recordset() use the right tuple descriptor. · c30f082d
      Tom Lane authored
      json{b}_populate_recordset() used the tuple descriptor created from the
      query-level AS clause without worrying about whether it matched the actual
      input record type.  If it didn't, that would usually result in a crash,
      though disclosure of server memory contents seems possible as well, for a
      skilled attacker capable of issuing crafted SQL commands.  Instead, use
      the query-supplied descriptor only when there is no input tuple to look at,
      and otherwise get a tuple descriptor based on the input tuple's own type
      marking.  The core code will detect any type mismatch in the latter case.
      
      Michael Paquier and Tom Lane, per a report from David Rowley.
      Back-patch to 9.3 where this functionality was introduced.
      
      Security: CVE-2017-15098
      c30f082d
    • Noah Misch's avatar
      start-scripts: switch to $PGUSER before opening $PGLOG. · 6b0b983f
      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
      6b0b983f
    • Dean Rasheed's avatar
      Always require SELECT permission for ON CONFLICT DO UPDATE. · 3f808957
      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
      3f808957
    • Noah Misch's avatar
      Add a temp-install prerequisite to "check"-like targets not having one. · 937f6780
      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.
      937f6780
  7. Nov 05, 2017
  8. Nov 04, 2017
  9. Nov 03, 2017
  10. Nov 02, 2017
  11. Nov 01, 2017
  12. Oct 31, 2017
    • Tom Lane's avatar
      Fix underqualified cast-target type names in pg_dump and psql queries. · 9cf2b854
      Tom Lane authored
      Queries running with some non-pg_catalog schema frontmost in their search
      path need to be careful to schema-qualify type names that should be sought
      in pg_catalog.  Vitaly Burovoy reported an oversight of this sort in
      pg_dump's dumpSequence, and grepping detected another one in psql's
      describeOneTableDetails, both introduced by sequence-related changes in
      v10.  In pg_dump, we can fix things by removing the cast altogether, since
      it doesn't really matter what data types are reported for these query
      result columns.  Likewise in psql, the query seemed to be working unduly
      hard to get a result that's guaranteed to be exactly 'bigint'.
      
      I also changed a couple of occurrences of "::char" similarly.  These are
      not bugs, since "char" is a typename keyword and not subject to search_path
      rules, but it seems better to use uniform style.
      
      Vitaly Burovoy and Tom Lane
      
      Discussion: https://postgr.es/m/CAKOSWN=ds66zLw2SqkLTM8wbXFgDbc_OdkmT3dJfPT2mE5kipA@mail.gmail.com
      9cf2b854
  13. Oct 30, 2017
    • Tom Lane's avatar
      Doc: call out UPDATE syntax change as a v10 compatibility issue. · 7becb5fa
      Tom Lane authored
      The change made by commit 906bfcad means that if you're writing
      a parenthesized column list in UPDATE ... SET, but that column list
      is only one column, you now need to write ROW(expression) on the
      righthand side, not just a parenthesized expression.  This was an
      intentional change for spec compatibility and potential future
      expansion of the possibilities for the RHS, but I'd neglected to
      document it as a compatibility issue, figuring that hardly anyone
      would bother with parenthesized syntax for a single target column.
      I was wrong, as shown by questions from Justin Pryzby, Adam Brusselback,
      and others.  Move the release note item into the compatibility section
      and point out the behavior change for a single target column.
      
      Discussion: https://postgr.es/m/CAMjNa7cDLzPcs0xnRpkvqmJ6Vb6G3EH8CYGp9ZBjXdpFfTz6dg@mail.gmail.com
      7becb5fa
Loading