1. 05 Jul, 2021 2 commits
  2. 04 Jul, 2021 2 commits
  3. 03 Jul, 2021 1 commit
  4. 02 Jul, 2021 4 commits
  5. 01 Jul, 2021 7 commits
  6. 30 Jun, 2021 3 commits
  7. 29 Jun, 2021 5 commits
  8. 28 Jun, 2021 9 commits
  9. 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
  10. 26 Jun, 2021 4 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
    • Michael Paquier's avatar
      Remove non-existing variable reference in MSVC's Solution.pm · d5a2c413
      Michael Paquier authored
      The version string is grabbed from PACKAGE_VERSION in pg_config.h in the
      MSVC build since 8f4fb4c6, but an error message referenced a variable
      that existed before that.  This had no consequences except if one messes
      up enough with the version number of the build.
      
      Author: Anton Voloshin
      Discussion: https://postgr.es/m/af79ee1b-9962-b299-98e1-f90a289e19e6@postgrespro.ru
      Backpatch-through: 13
      d5a2c413
    • Michael Paquier's avatar
      Remove some useless logs from the TAP tests of pgbench · 704e1dbd
      Michael Paquier authored
      002_pgbench_no_server was printing some array pointers instead of the
      actual contents of those arrays for the expected outputs of stdout and
      stderr for a tested command.  This does not add any new information that
      can help with debugging as the test names allow to track failure
      locations, if any.
      
      This commit simply removes those logs as the rest of the printed
      information is redundant with command_checks_all().
      
      Per discussion with Andrew Dunstan and Álvaro Herrera.
      
      Discussion: https://postgr.es/m/YNXNFaG7IgkzZanD@paquier.xyz
      Backpatch-through: 11
      704e1dbd
  11. 25 Jun, 2021 1 commit
    • Tom Lane's avatar
      Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). · 5a0f1c8c
      Tom Lane authored
      It's not really necessary for this function to open or lock the
      relation associated with the pg_policy entry it's modifying.  The
      error checks it's making on the rel are if anything counterproductive
      (e.g., if we don't want to allow installation of policies on system
      catalogs, here is not the place to prevent that).  In particular, it
      seems just wrong to insist on an ownership check.  That has the net
      effect of forcing people to use superuser for DROP OWNED BY, which
      surely is not an effect we want.  Also there is no point in rebuilding
      the dependencies of the policy expressions, which aren't being
      changed.  Lastly, locking the table also seems counterproductive; it's
      not helping to prevent race conditions, since we failed to re-read the
      pg_policy row after acquiring the lock.  That means that concurrent
      DDL would likely result in "tuple concurrently updated/deleted"
      errors; which is the same behavior this code will produce, with less
      overhead.
      
      Per discussion of bug #17062.  Back-patch to all supported versions,
      as the failure cases this eliminates seem just as undesirable in 9.6
      as in HEAD.
      
      Discussion: https://postgr.es/m/1573181.1624220108@sss.pgh.pa.us
      5a0f1c8c