1. 10 3月, 2008 1 次提交
  2. 09 3月, 2008 1 次提交
    • T
      Remove postmaster.c's check that NBuffers is at least twice MaxBackends. · d9384a4b
      Tom Lane 提交于
      With the addition of multiple autovacuum workers, our choices were to delete
      the check, document the interaction with autovacuum_max_workers, or complicate
      the check to try to hide that interaction.  Since this restriction has never
      been adequate to ensure backends can't run out of pinnable buffers, it doesn't
      really have enough excuse to live to justify the second or third choices.
      Per discussion of a complaint from Andreas Kling (see also bug #3888).
      
      This commit also removes several documentation references to this restriction,
      but I'm not sure I got them all.
      d9384a4b
  3. 07 3月, 2008 1 次提交
  4. 31 1月, 2008 1 次提交
  5. 28 1月, 2008 1 次提交
  6. 15 1月, 2008 1 次提交
  7. 02 1月, 2008 1 次提交
  8. 28 12月, 2007 1 次提交
    • T
      Improve consistency of error reporting in GUC assign_hook routines. Some · 5233dc15
      Tom Lane 提交于
      were reporting ERROR for interactive assignments and LOG for other cases,
      some were saying nothing for non-interactive cases, and a few did yet other
      things.  Make them use a new function GUC_complaint_elevel() to establish
      a reasonably uniform policy about how to report.  There are still a few
      edge cases such as assign_search_path(), but it's much better than before.
      Per gripe from Devrim Gunduz and subsequent discussion.
      
      As noted by Alvaro, it'd be better to fold these custom messages into the
      standard "invalid parameter value" complaint from guc.c, perhaps as the DETAIL
      field.  However that will require more redesign than seems prudent for 8.3.
      This is a relatively safe, low-impact change that we can afford to risk now.
      5233dc15
  9. 27 12月, 2007 1 次提交
  10. 16 11月, 2007 1 次提交
  11. 12 11月, 2007 1 次提交
    • T
      Ensure that typmod decoration on a datatype name is validated in all cases, · 0bd4da23
      Tom Lane 提交于
      even in code paths where we don't pay any subsequent attention to the typmod
      value.  This seems needed in view of the fact that 8.3's generalized typmod
      support will accept a lot of bogus syntax, such as "timestamp(foo)" or
      "record(int, 42)" --- if we allow such things to pass without comment,
      users will get confused.  Per a recent example from Greg Stark.
      
      To implement this in a way that's not very vulnerable to future
      bugs-of-omission, refactor the API of parse_type.c's TypeName lookup routines
      so that typmod validation is folded into the base lookup operation.  Callers
      can still choose not to receive the encoded typmod, but we'll check the
      decoration anyway if it's present.
      0bd4da23
  12. 10 11月, 2007 1 次提交
  13. 27 9月, 2007 1 次提交
    • T
      Minor improvements in backup and recovery: · f18dfc48
      Tom Lane 提交于
      - create a separate archive_mode GUC, on which archive_command is dependent
      
      - %r option in recovery.conf sends last restartpoint to recovery command
      
      - %r used in pg_standby, updated README
      
      - minor other code cleanup in pg_standby
      
      - doc on Warm Standby now mentions pg_standby and %r
      
      - log_restartpoints recovery option emits LOG message at each restartpoint
      
      - end of recovery now displays last transaction end time, as requested
        by Warren Little; also shown at each restartpoint
      
      - restart archiver if needed to carry away WAL files at shutdown
      
      Simon Riggs
      f18dfc48
  14. 26 9月, 2007 1 次提交
    • T
      Just-in-time background writing strategy. This code avoids re-scanning · 6f5c38dc
      Tom Lane 提交于
      buffers that cannot possibly need to be cleaned, and estimates how many
      buffers it should try to clean based on moving averages of recent allocation
      requests and density of reusable buffers.  The patch also adds a couple
      more columns to pg_stat_bgwriter to help measure the effectiveness of the
      bgwriter.
      
      Greg Smith, building on his own work and ideas from several other people,
      in particular a much older patch from Itagaki Takahiro.
      6f5c38dc
  15. 24 9月, 2007 1 次提交
    • T
      Simplify and rename some GUC variables, per various recent discussions: · 48f7e643
      Tom Lane 提交于
      * stats_start_collector goes away; we always start the collector process,
      unless prevented by a problem with setting up the stats UDP socket.
      
      * stats_reset_on_server_start goes away; it seems useless in view of the
      availability of pg_stat_reset().
      
      * stats_block_level and stats_row_level are merged into a single variable
      "track_counts", which controls all reports sent to the collector process.
      
      * stats_command_string is renamed to track_activities.
      
      * log_autovacuum is renamed to log_autovacuum_min_duration to better reflect
      its meaning.
      
      The log_autovacuum change is not a compatibility issue since it didn't exist
      before 8.3 anyway.  The other changes need to be release-noted.
      48f7e643
  16. 11 9月, 2007 1 次提交
    • T
      Arrange for SET LOCAL's effects to persist until the end of the current top · 82a47982
      Tom Lane 提交于
      transaction, unless rolled back or overridden by a SET clause for the same
      variable attached to a surrounding function call.  Per discussion, these
      seem the best semantics.  Note that this is an INCOMPATIBLE CHANGE: in 8.0
      through 8.2, SET LOCAL's effects disappeared at subtransaction commit
      (leading to behavior that made little sense at the SQL level).
      
      I took advantage of the opportunity to rewrite and simplify the GUC variable
      save/restore logic a little bit.  The old idea of a "tentative" value is gone;
      it was a hangover from before we had a stack.  Also, we no longer need a stack
      entry for every nesting level, but only for those in which a variable's value
      actually changed.
      82a47982
  17. 10 9月, 2007 3 次提交
  18. 04 9月, 2007 1 次提交
  19. 03 9月, 2007 1 次提交
  20. 21 8月, 2007 1 次提交
  21. 19 8月, 2007 1 次提交
  22. 14 8月, 2007 1 次提交
  23. 09 8月, 2007 1 次提交
  24. 05 8月, 2007 1 次提交
    • T
      Fix crash caused by log_timezone patch if we attempt to emit any elog messages · 4fd8d6b3
      Tom Lane 提交于
      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
  25. 04 8月, 2007 1 次提交
    • T
      Switch over to using the src/timezone functions for formatting timestamps · bdd6b622
      Tom Lane 提交于
      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
  26. 02 8月, 2007 1 次提交
  27. 24 7月, 2007 2 次提交
    • T
      Create a new dedicated Postgres process, "wal writer", which exists to write · ad429572
      Tom Lane 提交于
      and fsync WAL at convenient intervals.  For the moment it just tries to
      offload this work from backends, but soon it will be responsible for
      guaranteeing a maximum delay before asynchronously-committed transactions
      will be flushed to disk.
      
      This is a portion of Simon Riggs' async-commit patch, committed to CVS
      separately because a background WAL writer seems like it might be a good idea
      independently of the async-commit feature.  I rebased walwriter.c on
      bgwriter.c because it seemed like a more appropriate way of handling signals;
      while the startup/shutdown logic in postmaster.c is more like autovac because
      we want walwriter to quit before we start the shutdown checkpoint.
      ad429572
    • A
      Set a default autovacuum vacuum_cost_delay value of 20ms, to avoid excessive · 53d2951b
      Alvaro Herrera 提交于
      I/O utilization, per discussion.
      
      While at it, lower the autovacuum vacuum and analyze threshold values to 50
      tuples.  It is a bit higher (i.e. more conservative) than what I originally
      proposed but much better than the old values for small tables.
      53d2951b
  28. 10 7月, 2007 1 次提交
  29. 01 7月, 2007 1 次提交
  30. 28 6月, 2007 1 次提交
    • T
      Implement "distributed" checkpoints in which the checkpoint I/O is spread · 867e2c91
      Tom Lane 提交于
      over a fairly long period of time, rather than being spat out in a burst.
      This happens only for background checkpoints carried out by the bgwriter;
      other cases, such as a shutdown checkpoint, are still done at full speed.
      
      Remove the "all buffers" scan in the bgwriter, and associated stats
      infrastructure, since this seems no longer very useful when the checkpoint
      itself is properly throttled.
      
      Original patch by Itagaki Takahiro, reworked by Heikki Linnakangas,
      and some minor API editorialization by me.
      867e2c91
  31. 22 6月, 2007 2 次提交
  32. 21 6月, 2007 1 次提交
    • T
      Restrict deadlock_timeout to the range for which the implementation · 6f0072df
      Tom Lane 提交于
      actually works sanely, viz not 0 and not more than INT_MAX/1000
      (else TimestampTzPlusMilliseconds can overflow).  Per discussion with
      Greg Stark.  Since this is a superuser-only setting and there was not
      previously any big reason to change it, not worth back-patching.
      6f0072df
  33. 20 6月, 2007 1 次提交
    • T
      Code review for log_lock_waits patch. Don't try to issue log messages from · 6e072287
      Tom Lane 提交于
      within a signal handler (this might be safe given the relatively narrow code
      range in which the interrupt is enabled, but it seems awfully risky); do issue
      more informative log messages that tell what is being waited for and the exact
      length of the wait; minor other code cleanup.  Greg Stark and Tom Lane
      6e072287
  34. 18 6月, 2007 1 次提交
  35. 14 6月, 2007 1 次提交
  36. 09 6月, 2007 1 次提交