1. 10 Sep, 2020 6 commits
  2. 09 Sep, 2020 6 commits
  3. 08 Sep, 2020 8 commits
  4. 07 Sep, 2020 10 commits
  5. 06 Sep, 2020 8 commits
  6. 05 Sep, 2020 2 commits
    • Tom Lane's avatar
      Improve some ancient, crufty code in bootstrap + initdb. · e0f05cd5
      Tom Lane authored
      At some point back in the last century, somebody felt that reading
      all of pg_type twice was cheaper, or at least easier, than using
      repalloc() to resize the Typ[] array dynamically.  That seems like an
      entirely wacko proposition, so rewrite the code to do it the other
      way.  (To add insult to injury, there were two not-quite-identical
      copies of said code.)
      
      initdb.c's readfile() function had the same disease of preferring
      to do double the I/O to avoid resizing its output array.  Here,
      we can make things easier by using the just-invented pg_get_line()
      function to handle reading individual lines without a predetermined
      notion of how long they are.
      
      On my machine, it's difficult to detect any net change in the
      overall runtime of initdb from these changes; but they should
      help on slower buildfarm machines (especially since a buildfarm
      cycle involves a lot of initdb's these days).
      
      My attention was drawn to these places by scan-build complaints,
      but on inspection they needed a lot more work than just suppressing
      dead stores :-(
      e0f05cd5
    • Tom Lane's avatar
      Yet more elimination of dead stores and useless initializations. · a5cc4dab
      Tom Lane authored
      I'm not sure what tool Ranier was using, but the ones I contributed
      were found by using a newer version of scan-build than I tried before.
      
      Ranier Vilela and Tom Lane
      
      Discussion: https://postgr.es/m/CAEudQAo1+AcGppxDSg8k+zF4+Kv+eJyqzEDdbpDg58-=MQcerQ@mail.gmail.com
      a5cc4dab