1. 07 Jul, 2021 3 commits
    • Tom Lane's avatar
      Fix crash in postgres_fdw for provably-empty remote UPDATE/DELETE. · 30a35bca
      Tom Lane authored
      In 86dc9005, I'd written find_modifytable_subplan with the assumption
      that if the immediate child of a ModifyTable is a Result, it must be
      a projecting Result with a subplan.  However, if the UPDATE or DELETE
      has a provably-constant-false WHERE clause, that's not so: we'll
      generate a dummy subplan with a childless Result.  Add the missing
      null-check so we don't crash on such cases.
      
      Per report from Alexander Pyhalov.
      
      Discussion: https://postgr.es/m/b9a6f53549456b2f3e2fd150dcd79d72@postgrespro.ru
      30a35bca
    • Fujii Masao's avatar
      doc: Fix description about pg_stat_statements.track_planning. · e48f2afe
      Fujii Masao authored
      This commit fixes wrong wording like "a fewer kinds"
      in the description about track_planning option.
      
      Back-patch to v13 where pg_stat_statements.track_planning was added.
      
      Author: Justin Pryzby
      Reviewed-by: Julien Rouhaud, Fujii Masao
      Discussion: https://postgr.es/m/20210418233615.GB7256@telsasoft.com
      e48f2afe
    • Fujii Masao's avatar
      postgres_fdw: Tighten up allowed values for batch_size, fetch_size options. · 4173477b
      Fujii Masao authored
      Previously the values such as '100$%$#$#', '9,223,372,' were accepted and
      treated as valid integers for postgres_fdw options batch_size and fetch_size.
      Whereas this is not the case with fdw_startup_cost and fdw_tuple_cost options
      for which an error is thrown. This was because endptr was not used
      while converting strings to integers using strtol.
      
      This commit changes the logic so that it uses parse_int function
      instead of strtol as it serves the purpose by returning false in case
      if it is unable to convert the string to integer. Note that
      this function also rounds off the values such as '100.456' to 100 and
      '100.567' or '100.678' to 101.
      
      While on this, use parse_real for fdw_startup_cost and fdw_tuple_cost options.
      
      Since parse_int and parse_real are being used for reloptions and GUCs,
      it is more appropriate to use in postgres_fdw rather than using strtol
      and strtod directly.
      
      Back-patch to v14.
      
      Author: Bharath Rupireddy
      Reviewed-by: Ashutosh Bapat, Tom Lane, Kyotaro Horiguchi, Fujii Masao
      Discussion: https://postgr.es/m/CALj2ACVMO6wY5Pc4oe1OCgUOAtdjHuFsBDw8R5uoYR86eWFQDA@mail.gmail.com
      4173477b
  2. 06 Jul, 2021 2 commits
  3. 05 Jul, 2021 4 commits
    • Tom Lane's avatar
      Reduce overhead of cache-clobber testing in LookupOpclassInfo(). · 07f1e069
      Tom Lane authored
      Commit 03ffc4d6 added logic to bypass all caching behavior in
      LookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled.  It doesn't
      look like I stopped to think much about what that would cost, but
      recent investigation shows that the cost is enormous: it roughly
      doubles the time needed for cache-clobber test runs.
      
      There does seem to be value in this behavior when trying to test
      the opclass-cache loading logic itself, but for other purposes the
      cost is excessive.  Hence, let's back off to doing this only when
      debug_invalidate_system_caches_always is at least 3; or in older
      branches, when CLOBBER_CACHE_RECURSIVELY is defined.
      
      While here, clean up some other minor issues in LookupOpclassInfo.
      Re-order the code so we aren't left with broken cache entries (leading
      to later core dumps) in the unlikely case that we suffer OOM while
      trying to allocate space for a new entry.  (That seems to be my
      oversight in 03ffc4d6.)  Also, in >= v13, stop allocating one array
      entry too many.  That's evidently left over from sloppy reversion in
      851b14b0.
      
      Back-patch to all supported branches, mainly to reduce the runtime
      of cache-clobbering buildfarm animals.
      
      Discussion: https://postgr.es/m/1370856.1625428625@sss.pgh.pa.us
      07f1e069
    • Tom Lane's avatar
      Rethink blocking annotations in detach-partition-concurrently-[34]. · 9fa6fe46
      Tom Lane authored
      In 741d7f10, I tried to make the reports from canceled steps come out
      after the pg_cancel_backend() steps, since that was the most common
      ordering before.  However, that doesn't ensure that a canceled step
      doesn't report even later, as shown in a recent failure on buildfarm
      member idiacanthus.  Rather than complicating things even more with
      additional annotations, let's just force the cancel's effect to be
      reported first.  It's not *that* unnatural-looking.
      
      Back-patch to v14 where these test cases appeared.
      
      Report: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=idiacanthus&dt=2021-07-02%2001%3A40%3A04
      9fa6fe46
    • Peter Eisentraut's avatar
      doc: Fix quoting markup · 1479c5af
      Peter Eisentraut authored
      1479c5af
    • Amit Kapila's avatar
      Doc: Hash Indexes. · f3690fbd
      Amit Kapila authored
      A new chapter for Hash Indexes, designed to help users understand how
      they work and when to use them.
      
      Backpatch-through 10 where we have made hash indexes durable.
      
      Author: Simon Riggs
      Reviewed-By: Justin Pryzby, Amit Kapila
      Discussion: https://postgr.es/m/CANbhV-HRjNPYgHo--P1ewBrFJ-GpZPb9_25P7=Wgu7s7hy_sLQ@mail.gmail.com
      f3690fbd
  4. 04 Jul, 2021 2 commits
  5. 03 Jul, 2021 1 commit
  6. 02 Jul, 2021 4 commits
  7. 01 Jul, 2021 7 commits
  8. 30 Jun, 2021 3 commits
  9. 29 Jun, 2021 5 commits
  10. 28 Jun, 2021 9 commits