1. 22 May, 2019 13 commits
  2. 21 May, 2019 10 commits
  3. 20 May, 2019 10 commits
    • Tom Lane's avatar
      Doc: improve description of regexp character classes. · cf92226e
      Tom Lane authored
      Define the meanings of the POSIX-spec character classes in line,
      rather than referring to the ctype(3) man page.  That man page
      doesn't even exist on many modern systems, and if it does exist
      it probably says the wrong things about non-ASCII characters.
      Also document our non-POSIX-spec "ascii" character class.
      
      Also, point out here that this behavior is controlled by collation or
      LC_CTYPE, since the existing text explaining that is pretty far away.
      
      Per gripe from Geert Lobbestael.  Given the lack of prior complaints,
      I'm not excited about back-patching this.
      
      Discussion: https://postgr.es/m/155837022049.1359.2948065118562813468@wrigleys.postgresql.org
      cf92226e
    • Tom Lane's avatar
      Stamp 12beta1. · a240570b
      Tom Lane authored
      a240570b
    • Andres Freund's avatar
      Fix regression tests broken in fc7c281f. · 47a14c99
      Andres Freund authored
      This shouldn't have been committed without even running the tests (nor
      were the tests added that were suggested). I'm fixing up the results
      to get the buildfarm back to green, it's quite possible we'll want to
      revert this later.
      47a14c99
    • Fujii Masao's avatar
      Fix comment for issue_xlog_fsync(). · b8e2170e
      Fujii Masao authored
      "segno" is the argument for the function, not "log" and "seg".
      
      Author: Antonin Houska
      Discussion: https://postgr.es/m/11863.1558361020@spoje.net
      b8e2170e
    • Fujii Masao's avatar
      Make VACUUM accept 1 and 0 as a boolean value. · fc7c281f
      Fujii Masao authored
      Commit 41b54ba7 allowed existing VACUUM options to take a boolean
      argument. It's documented that valid boolean values that VACUUM can
      accept are true, false, on, off, 1, and 0. But previously the parser
      failed to accept 1 and 0 as a boolean value in VACUUM syntax because
      of a lack of NumericOnly clause for vac_analyze_option_arg in gram.y.
      
      This commit adds such NumericOnly clause so that VACUUM options
      can take also 1 and 0 as a boolean value.
      
      Discussion: https://postgr.es/m/CAHGQGwGYg82A8UCQxZe7Zn9MnyUBGdyB=1CNpKF3jBny+RbyfA@mail.gmail.com
      fc7c281f
    • Peter Eisentraut's avatar
      Translation updates · 3c439a58
      Peter Eisentraut authored
      Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
      Source-Git-Hash: a20bf6b8a5b4e32450967055eb5b07cee4704edd
      3c439a58
    • Peter Eisentraut's avatar
      Remove bug.template file · 8bbb8166
      Peter Eisentraut authored
      It's outdated and not really in use anymore.
      
      Discussion: https://www.postgresql.org/message-id/flat/cf7ed2b1-1ebe-83cf-e05e-d5943f67af2d%402ndquadrant.com
      8bbb8166
    • Andres Freund's avatar
      Remove outdated comment in copy.c. · fb504c5e
      Andres Freund authored
      fb504c5e
    • Andres Freund's avatar
      Minimally fix partial aggregation for aggregates that don't have one argument. · 26572832
      Andres Freund authored
      For partial aggregation combine steps,
      AggStatePerTrans->numTransInputs was set to the transition function's
      number of inputs, rather than the combine function's number of
      inputs (always 1).
      
      That lead to partial aggregates with strict combine functions to
      wrongly check for NOT NULL input as required by strictness. When the
      aggregate wasn't exactly passed one argument, the strictness check was
      either omitted (in the 0 args case) or too many arguments were
      checked. In the latter case we'd read beyond the end of
      FunctionCallInfoData->args (only in master).
      
      AggStatePerTrans->numTransInputs actually has been wrong since since
      9.6, where partial aggregates were added. But it turns out to not be
      an active problem in 9.6 and 10, because numTransInputs wasn't used at
      all for combine functions: Before c253b722f6 there simply was no NULL
      check for the input to strict trans functions, and after that the
      check was simply hardcoded for the right offset in fcinfo, as it's
      done by code specific to combine functions.
      
      In bf6c614a (11) the strictness check was generalized, with common
      code doing the strictness checks for both plain and combine transition
      functions, based on numTransInputs. For combine functions this lead to
      not emitting an expression step to check for strict input in the 0
      arguments case, and in the > 1 arguments case, we'd check too many
      arguments.Due to the fact that the relevant fcinfo->isnull[2..] was
      always zero-initialized (more or less by accident, by being part of
      the AggStatePerTrans struct, which is palloc0'ed), there was no
      observable damage in the latter case before a9c35cf8, we just
      checked too many array elements.
      
      Due to the changes in a9c35cf8, > 1 argument bug became visible,
      because these days fcinfo is a) dynamically allocated without being
      zeroed b) exactly the length required for the number of specified
      arguments (hardcoded to 2 in this case).
      
      This commit only contains a fairly minimal fix, setting numTransInputs
      to a hardcoded 1 when building a pertrans for a combine function. It
      seems likely that we'll want to clean this up further (e.g. the
      arguments build_pertrans_for_aggref() aren't particularly meaningful
      for combine functions). But the wrap date for 12 beta1 is coming up
      fast, so it seems good to have a minimal fix in place.
      
      Backpatch to 11. While AggStatePerTrans->numTransInputs was set
      wrongly before that, the value was not used for combine functions.
      
      Reported-By: Rajkumar Raghuwanshi
      Diagnosed-By: Kyotaro Horiguchi, Jeevan Chalke, Andres Freund, David Rowley
      Author: David Rowley, Kyotaro Horiguchi, Andres Freund
      Discussion: https://postgr.es/m/CAKcux6=uZEyWyLw0N7HtR9OBc-sWEFeByEZC7t-KDf15FKxVew@mail.gmail.com
      26572832
    • Michael Paquier's avatar
      Fix some grammar in documentation of spgist and pgbench · 03310dbe
      Michael Paquier authored
      Discussion: https://postgr.es/m/92961161-9b49-e42f-0a72-d5d47e0ed4de@postgrespro.ru
      Author: Liudmila Mantrova
      Reviewed-by: Jonathan Katz, Tom Lane, Michael Paquier
      Backpatch-through: 9.4
      03310dbe
  4. 19 May, 2019 7 commits
    • Andres Freund's avatar
      Fix and improve SnapshotType comments. · 78d6a9cb
      Andres Freund authored
      The comment for SNAPSHOT_SELF was unfortunately explaining
      SNAPSHOT_DIRTY, as reported by Sergei. Also expand a few comments, and
      include a few more comments from heapam_visibility.c, so they're in an
      AM independent place.
      
      Reported-By: Sergei Kornilov
      Author: Andres Freund
      Discussion: https://postgr.es/m/9152241558192351@sas1-d856b3d759c7.qloud-c.yandex.net
      78d6a9cb
    • Noah Misch's avatar
      Revert "In the pg_upgrade test suite, don't write to src/test/regress." · ae35e1c9
      Noah Misch authored
      This reverts commit bd1592e8.  It had
      multiple defects.
      
      Discussion: https://postgr.es/m/12717.1558304356@sss.pgh.pa.us
      ae35e1c9
    • Andres Freund's avatar
      Don't to predicate lock for analyze scans, refactor scan option passing. · c3b23ae4
      Andres Freund authored
      Before this commit, when ANALYZE was run on a table and serializable
      was used (either by virtue of an explicit BEGIN TRANSACTION ISOLATION
      LEVEL SERIALIZABLE, or default_transaction_isolation being set to
      serializable) a null pointer dereference lead to a crash.
      
      The analyze scan doesn't need a snapshot (nor predicate locking), but
      before this commit a scan only contained information about being a
      bitmap or sample scan.
      
      Refactor the option passing to the scan_begin callback to use a
      bitmask instead. Alternatively we could have added a new boolean
      parameter, but that seems harder to read. Even before this issue
      various people (Heikki, Tom, Robert) suggested doing so.
      
      These changes don't change the scan APIs outside of tableam. The flags
      argument could be exposed, it's not necessary to fix this
      problem. Also the wrapper table_beginscan* functions encapsulate most
      of that complexity.
      
      After these changes fixing the bug is trivial, just don't acquire
      predicate lock for analyze style scans. That was already done for
      bitmap heap scans.  Add an assert that a snapshot is passed when
      acquiring the predicate lock, so this kind of bug doesn't require
      running with serializable.
      
      Also add a comment about sample scans currently requiring predicate
      locking the entire relation, that previously wasn't remarked upon.
      
      Reported-By: Joe Wildish
      Author: Andres Freund
      Discussion:
          https://postgr.es/m/4EA80A20-E9BF-49F1-9F01-5B66CAB21453@elusive.cx
          https://postgr.es/m/20190411164947.nkii4gaeilt4bui7@alap3.anarazel.de
          https://postgr.es/m/20190518203102.g7peu2fianukjuxm@alap3.anarazel.de
      c3b23ae4
    • Noah Misch's avatar
      In the pg_upgrade test suite, don't write to src/test/regress. · bd1592e8
      Noah Misch authored
      When this suite runs installcheck, redirect file creations from
      src/test/regress to src/bin/pg_upgrade/tmp_check/regress.  This closes a
      race condition in "make -j check-world".  If the pg_upgrade suite wrote
      to a given src/test/regress/results file in parallel with the regular
      src/test/regress invocation writing it, a test failed spuriously.  Even
      without parallelism, in "make -k check-world", the suite finishing
      second overwrote the other's regression.diffs.  This revealed test
      "largeobject" assuming @abs_builddir@ is getcwd(), so fix that, too.
      
      Buildfarm client REL_10, released forty-five days ago, supports saving
      regression.diffs from its new location.  When an older client reports a
      pg_upgradeCheck failure, it will no longer include regression.diffs.
      Back-patch to 9.5, where pg_upgrade moved to src/bin.
      
      Reviewed by Andrew Dunstan.
      
      Discussion: https://postgr.es/m/20181224034411.GA3224776@rfd.leadboat.com
      bd1592e8
    • Tom Lane's avatar
      Improve logrotate test so that it meaningfully exercises syslogger. · 9d5c22d2
      Tom Lane authored
      Discussion of bug #15804 reveals that this test didn't really prove
      that the syslogger child process ever launched successfully, much
      less did anything.  It was only checking that the expected log file
      gets created, and that's done in the postmaster.  Moreover, the
      test assumed it could rename the log file, which is likely to fail
      on Windows (cf. commit d611175e).
      
      Instead, use the default log file name pattern, which should result
      in a new file name being chosen after 1 second, and verify that
      rotation has occurred by checking for a new file name.  Also add code
      to test that messages actually do propagate through the syslogger.
      
      In theory this version of the test should work on Windows, so
      revert d611175e.
      
      Discussion: https://postgr.es/m/15804-3721117bf40fb654@postgresql.org
      9d5c22d2
    • Tom Lane's avatar
      Revert "postmaster: Start syslogger earlier". · 83345155
      Tom Lane authored
      This commit reverts 57431a91.
      
      While that's still a good idea in the abstract, we found out
      that there are multiple crasher bugs in it on Windows builds,
      making the logging_collector option unusable on Windows.
      There's no time left to fix these issues before 12beta1,
      so revert the patch to allow Windows beta testing to proceed.
      We'll try again at some future date.
      
      Per bug #15804 from Yulian Khodorkovskiy and additional
      investigation by Michael Paquier.
      
      Discussion: https://postgr.es/m/15804-3721117bf40fb654@postgresql.org
      83345155
    • Alexander Korotkov's avatar
      Fix declarations of couple jsonpath functions · da24961e
      Alexander Korotkov authored
      Make jsonb_path_query_array() and jsonb_path_query_first() use
      PG_FUNCTION_ARGS macro instead of its expansion.
      da24961e