1. 09 Aug, 2007 2 commits
    • Tom Lane's avatar
      faa11796
    • Tom Lane's avatar
      Revise postmaster startup/shutdown logic to eliminate the problem that a · bbe3c02d
      Tom Lane authored
      constant flow of new connection requests could prevent the postmaster from
      completing a shutdown or crash restart.  This is done by labeling child
      processes that are "dead ends", that is, we know that they were launched only
      to tell a client that it can't connect.  These processes are managed
      separately so that they don't confuse us into thinking that we can't advance
      to the next stage of a shutdown or restart sequence, until the very end
      where we must wait for them to drain out so we can delete the shmem segment.
      Per discussion of a misbehavior reported by Keaton Adams.
      
      Since this code was baroque already, and my first attempt at fixing the
      problem made it entirely impenetrable, I took the opportunity to rewrite it
      in a state-machine style.  That eliminates some duplicated code sections and
      hopefully makes everything a bit clearer.
      bbe3c02d
  2. 08 Aug, 2007 2 commits
    • Neil Conway's avatar
      Fix a gradual memory leak in ExecReScanAgg(). Because the aggregation · c556b29a
      Neil Conway authored
      hash table is allocated in a child context of the agg node's memory
      context, MemoryContextReset() will reset but *not* delete the child
      context. Since ExecReScanAgg() proceeds to build a new hash table
      from scratch (in a new sub-context), this results in leaking the
      header for the previous memory context. Therefore, use
      MemoryContextResetAndDeleteChildren() instead.
      
      Credit: My colleague Sailesh Krishnamurthy at Truviso for isolating
      the cause of the leak.
      c556b29a
    • Tom Lane's avatar
      Fix thinko in multi-autovac-workers code: validity checks made by · af1022d2
      Tom Lane authored
      GUC assign hooks are supposed to be made whether doit is true or not.
      af1022d2
  3. 07 Aug, 2007 1 commit
  4. 06 Aug, 2007 2 commits
  5. 05 Aug, 2007 2 commits
  6. 04 Aug, 2007 5 commits
    • Tom Lane's avatar
      Fix up bad layout of some comments (probably pg_indent's fault), and · 8d303375
      Tom Lane authored
      improve grammar a tad.  Per Greg Stark.
      8d303375
    • Neil Conway's avatar
      Tweak for initdb: if more command-line arguments were specified than · 087a2713
      Neil Conway authored
      expected, exit with an error, rather than complaining about the error
      on stderr but continuing onward.
      087a2713
    • Tom Lane's avatar
      Fix crash caused by log_timezone patch if we attempt to emit any elog messages · 4fd8d6b3
      Tom Lane authored
      between the setting of log_line_prefix and the setting of log_timezone.  We
      can't realistically set log_timezone any earlier than we do now, so the best
      behavior seems to be to use GMT zone if any timestamps are to be logged during
      early startup.  Create a dummy zone variable with a minimal definition of GMT
      (in particular it will never know about leap seconds), so that we can set it
      up without reference to any external files.
      4fd8d6b3
    • Tom Lane's avatar
      Fix a problem in my recent patch to initialize cancel_key for autovac workers · 0b9d3d4d
      Tom Lane authored
      as well as regular backends: if no regular backend launches before the autovac
      launcher tries to start an autovac worker, the postmaster would get an Assert
      fault due to calling PostmasterRandom before random_seed was initialized.
      Cleanest solution seems to be to take the initialization of random_seed out
      of ServerLoop and let PostmasterRandom do it for itself.
      0b9d3d4d
    • Tom Lane's avatar
      Switch over to using the src/timezone functions for formatting timestamps · bdd6b622
      Tom Lane authored
      displayed in the postmaster log.  This avoids Windows-specific problems with
      localized time zone names that are in the wrong encoding, and generally seems
      like a good idea to forestall other potential platform-dependent issues.
      To preserve the existing behavior that all backends will log in the same time
      zone, create a new GUC variable log_timezone that can only be changed on a
      system-wide basis, and reference log-related calculations to that zone instead
      of the TimeZone variable.
      
      This fixes the issue reported by Hiroshi Saito that timestamps printed by
      xlog.c startup could be improperly localized on Windows.  We still need a
      simpler patch for that problem in the back branches, however.
      bdd6b622
  7. 03 Aug, 2007 2 commits
  8. 02 Aug, 2007 3 commits
  9. 01 Aug, 2007 5 commits
  10. 31 Jul, 2007 3 commits
  11. 27 Jul, 2007 2 commits
  12. 26 Jul, 2007 1 commit
  13. 25 Jul, 2007 9 commits
  14. 24 Jul, 2007 1 commit