1. 15 May, 2018 2 commits
    • Tom Lane's avatar
      Fix type checking for support functions of parallel VARIADIC aggregates. · 05ca21b8
      Tom Lane authored
      The impact of VARIADIC on the combine/serialize/deserialize support
      functions of an aggregate wasn't thought through carefully.  There is
      actually no impact, because variadicity isn't passed through to these
      functions (and it doesn't seem like it would need to be).  However,
      lookup_agg_function was mistakenly told to check things as though it were
      passed through.  The net result was that it was impossible to declare an
      aggregate that had both VARIADIC input and parallelism support functions.
      
      In passing, fix a runtime check in nodeAgg.c for the combine function's
      strictness to make its error message agree with the creation-time check.
      The previous message was actually backwards, and it doesn't seem like
      there's a good reason to have two versions of this message text anyway.
      
      Back-patch to 9.6 where parallel aggregation was introduced.
      
      Alexey Bashtanov; message fix by me
      
      Discussion: https://postgr.es/m/f86dde87-fef4-71eb-0480-62754aaca01b@imap.cc
      05ca21b8
    • Bruce Momjian's avatar
      doc: clarify SCRAM channel binding · 185f4f84
      Bruce Momjian authored
      Discussion: https://postgr.es/m/20180514231020.GB1600@paquier.xyz
      
      Reviewed-by: Michael Paquier
      185f4f84
  2. 14 May, 2018 5 commits
  3. 13 May, 2018 1 commit
  4. 12 May, 2018 1 commit
  5. 11 May, 2018 5 commits
  6. 10 May, 2018 1 commit
    • Teodor Sigaev's avatar
      Various improvements of skipping index scan during vacuum technics · 8e12f4a2
      Teodor Sigaev authored
      - Change vacuum_cleanup_index_scale_factor GUC to PGC_USERSET.
        vacuum_cleanup_index_scale_factor GUC was defined as PGC_SIGHUP.  But this
        GUC affects not only autovacuum.  So it might be useful to change it from user
        session in order to influence manually runned VACUUM.
      - Add missing tab-complete support for vacuum_cleanup_index_scale_factor
        reloption.
      - Fix condition for B-tree index cleanup.
        Zero value of vacuum_cleanup_index_scale_factor means that user wants B-tree
        index cleanup to be never skipped.
      - Documentation and comment improvements
      
      Authors: Justin Pryzby, Alexander Korotkov, Liudmila Mantrova
      Reviewed by: all authors and Robert Haas
      Discussion: https://www.postgresql.org/message-id/flat/20180502023025.GD7631%40telsasoft.com
      8e12f4a2
  7. 09 May, 2018 13 commits
  8. 08 May, 2018 3 commits
    • Tom Lane's avatar
      Improve initdb's query for generating default descriptions a little. · dec10340
      Tom Lane authored
      While poking into initdb's performance, I noticed that this query
      wasn't being done very intelligently.  By forcing it to execute
      obj_description() for each pg_proc/pg_operator join row, we were
      essentially setting up a nestloop join to pg_description, which
      is not a bright query plan when there are hundreds of outer rows.
      Convert the check for a "deprecated" operator into a NOT EXISTS
      so that it can be done as a hashed antijoin.  On my workstation
      this reduces the time for this query from ~ 35ms to ~ 10ms.
      Which is not a huge win, but it adds up over buildfarm runs.
      
      In passing, insert forced query breaks (\n\n, in single-user mode)
      after each SQL-query file that initdb sources, and after some
      relatively new queries in setup_privileges().  This doesn't make
      a lot of difference normally, but it will result in briefer, saner
      error messages if anything goes wrong.
      dec10340
    • Peter Eisentraut's avatar
      Refine error messages · 831f5d11
      Peter Eisentraut authored
      "JSON" when not referring to a data type should be upper case.
      831f5d11
    • Tom Lane's avatar
      Count heap tuples in non-SnapshotAny path in IndexBuildHeapRangeScan(). · 3a675f72
      Tom Lane authored
      Brown-paper-bag bug in commit 7c91a036: when we rearranged the placement
      of "reltuples += 1" statements, we missed including one in this code path.
      
      The net effect of that was that CREATE INDEX CONCURRENTLY would set the
      table's pg_class.reltuples to zero, as would index builds done during
      bootstrap mode.  (It seems like parallel index builds ought to fail
      similarly, but they don't, perhaps because reltuples is computed in some
      other way.  You certainly couldn't figure that out from the abysmally
      underdocumented parallelism code in this area.)
      
      I was led to this by wondering why initdb seemed to have slowed down as
      a result of 7c91a036, as is evident in the buildfarm's timing history.
      The reason is that every system catalog with indexes had pg_class.reltuples
      = 0 after bootstrap, causing the planner to make some terrible choices for
      queries in the post-bootstrap steps.  On my workstation, this fix causes
      the runtime of "initdb -N" to drop from ~2.0 sec to ~1.4 sec, which is
      almost though not quite back to where it was in v10.  That's not much of
      a deal for production use perhaps, but it makes a noticeable difference
      for buildfarm and "make check-world" runs, which do a lot of initdbs.
      3a675f72
  9. 07 May, 2018 9 commits
    • Andrew Dunstan's avatar
      Clean up some perlcritic warnings · d2c1512a
      Andrew Dunstan authored
      In Catalog.pm, mark eval of a string instead of a block as allowed.
      Disallow perlcritic completely in Gen_dummy_probes.pl, as it's
      generated code.
      Protect a couple of lines in plperl code from  perltidy, so that the
      annotation for perlcritic stays on the same line as the construct it
      would otherwise object to.
      d2c1512a
    • Tom Lane's avatar
      Undo extra chattiness of postmaster logs in TAP tests. · 17551f1a
      Tom Lane authored
      Commit 6271fceb changed PostgresNode.pm to force log_min_messages = debug1
      in all TAP tests, without any discussion and without a concrete need for
      it.  This makes some of the TAP tests noticeably slower (although much of
      that may be due to poorly-written regexes), and for certain it's bloating
      the buildfarm logs.  Revert the change.
      
      Discussion: https://postgr.es/m/32459.1525657786@sss.pgh.pa.us
      17551f1a
    • Tom Lane's avatar
      Update oidjoins regression test for v11. · fbb99e58
      Tom Lane authored
      Commit 86f57594 already manually updated the oidjoins test for the
      new pg_constraint.conparentid => pg_constraint.oid relationship, but
      failed to update findoidjoins/README, thus the apparent inconsistency
      here.
      
      Michael Paquier
      
      Discussion: https://postgr.es/m/20180507001811.GA27389@paquier.xyz
      fbb99e58
    • Tom Lane's avatar
      Suppress compiler warnings when building with --enable-dtrace. · 513ff52e
      Tom Lane authored
      Most versions of "dtrace -h" drop const qualifiers from the declarations
      of probe functions (though macOS gets it right).  This causes compiler
      warnings when we pass in pointers to const.  Repair by extending our
      existing post-processing of the probes.h file.  To do so, assume that all
      "char *" arguments should be "const char *"; that seems reasonably safe.
      
      Thomas Munro
      
      Discussion: https://postgr.es/m/CAEepm=2j1pWSruQJqJ91ZDzD8w9ZZDsM4j2C6x75C-VryWg-_w@mail.gmail.com
      513ff52e
    • Tom Lane's avatar
      Last-minute updates for release notes. · f34f0e4c
      Tom Lane authored
      The set of functions that need parallel-safety adjustments isn't the
      same in 9.6 as 10, so I shouldn't have blindly back-patched that list.
      Adjust as needed.  Also, provide examples of the commands to issue.
      f34f0e4c
    • Tom Lane's avatar
      Last-minute updates for release notes. · b56d5f23
      Tom Lane authored
      Security: CVE-2018-1115
      b56d5f23
    • Peter Eisentraut's avatar
      doc: Improve spelling and wording a bit · a43a4509
      Peter Eisentraut authored
      a43a4509
    • Peter Eisentraut's avatar
      doc: Fix minor markup issue · baf21b92
      Peter Eisentraut authored
      There shouldn't be a line break between two adjacent tags, because that
      will appear as whitespace in the output.  (The rendering engine might in
      turn collapse that whitespace away, so it might not actually make a
      difference, but it's more correct this way.)
      baf21b92
    • Stephen Frost's avatar
      adminpack: Revoke EXECUTE on pg_logfile_rotate() · 7b347409
      Stephen Frost authored
      In 9.6, we moved a number of functions over to using the GRANT system to
      control access instead of having hard-coded superuser checks.
      
      As it turns out, adminpack was creating another function in the catalog
      for one of those backend functions where the superuser check was
      removed, specifically pg_rotate_logfile(), but it didn't get the memo
      about having to REVOKE EXECUTE on the alternative-name function
      (pg_logfile_rotate()), meaning that in any installations with adminpack
      on 9.6 and higher, any user is able to run the pg_logfile_rotate()
      function, which then calls pg_rotate_logfile() and rotates the logfile.
      
      Fix by adding a new version of adminpack (1.1) which handles the REVOKE.
      As this function should have only been available to the superuser, this
      is a security issue, albeit a minor one.
      
      In HEAD, move the changes implemented for adminpack up to be adminpack
      2.0 instead of 1.1.
      
      Security: CVE-2018-1115
      7b347409