1. 06 Jul, 2021 1 commit
  2. 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
  3. 04 Jul, 2021 2 commits
  4. 03 Jul, 2021 1 commit
  5. 02 Jul, 2021 4 commits
  6. 01 Jul, 2021 7 commits
  7. 30 Jun, 2021 3 commits
  8. 29 Jun, 2021 5 commits
  9. 28 Jun, 2021 9 commits
  10. 27 Jun, 2021 2 commits
    • Tom Lane's avatar
      Remove memory leaks in isolationtester. · 642c0697
      Tom Lane authored
      specscanner.l leaked a kilobyte of memory per token of the spec file.
      Apparently somebody thought that the introductory code block would be
      executed once; but it's once per yylex() call.
      
      A couple of functions in isolationtester.c leaked small amounts of
      memory due to not bothering to free one-time allocations.  Might
      as well improve these so that valgrind gives this program a clean
      bill of health.  Also get rid of an ugly static variable.
      
      Coverity complained about one of the one-time leaks, which led me
      to try valgrind'ing isolationtester, which led to discovery of the
      larger leak.
      642c0697
    • Peter Eisentraut's avatar
      Error message refactoring · c302a613
      Peter Eisentraut authored
      Take some untranslatable things out of the message and replace by
      format placeholders, to reduce translatable strings and reduce
      translation mistakes.
      c302a613
  11. 26 Jun, 2021 2 commits
    • Tom Lane's avatar
      dcffc9ba
    • Tom Lane's avatar
      Remove undesirable libpq dependency on stringinfo.c. · 8ec00dc5
      Tom Lane authored
      Commit c0cb87fb unwisely introduced a dependency on the StringInfo
      machinery in fe-connect.c.  We must not use that in libpq, because
      it will do a summary exit(1) if it hits OOM, and that is not
      appropriate behavior for a general-purpose library.  The goal of
      allowing arbitrary line lengths in service files doesn't seem like
      it's worth a lot of effort, so revert back to the previous method
      of using a stack-allocated buffer and failing on buffer overflow.
      
      This isn't an exact revert though.  I kept that patch's refactoring
      to have a single exit path, as that seems cleaner than having each
      error path know what to do to clean up.  Also, I made the fixed-size
      buffer 1024 bytes not 256, just to push off the need for an expandable
      buffer some more.
      
      There is more to do here; in particular the lack of any mechanical
      check for this type of mistake now seems pretty hazardous.  But this
      fix gets us back to the level of robustness we had in v13, anyway.
      
      Discussion: https://postgr.es/m/daeb22ec6ca8ef61e94d766a9b35fb03cabed38e.camel@vmware.com
      8ec00dc5