Skip to content
Snippets Groups Projects
  1. Nov 30, 2011
  2. Oct 25, 2011
  3. Oct 19, 2011
  4. Sep 09, 2011
    • Tom Lane's avatar
      Simplify handling of the timezone GUC by making initdb choose the default. · ca4af308
      Tom Lane authored
      We were doing some amazingly complicated things in order to avoid running
      the very expensive identify_system_timezone() procedure during GUC
      initialization.  But there is an obvious fix for that, which is to do it
      once during initdb and have initdb install the system-specific default into
      postgresql.conf, as it already does for most other GUC variables that need
      system-environment-dependent defaults.  This means that the timezone (and
      log_timezone) settings no longer have any magic behavior in the server.
      Per discussion.
      ca4af308
  5. Aug 06, 2011
    • Tom Lane's avatar
      Reduce PG_SYSLOG_LIMIT to 900 bytes. · 375aa7b3
      Tom Lane authored
      The previous limit of 1024 was set on the assumption that all modern syslog
      implementations have line length limits of 2KB or so.  However, this is
      false, as at least Solaris and sysklogd truncate at only 1KB.  900 seems
      to leave enough room for the max likely length of the tacked-on prefixes,
      so let's go with that.
      
      As with the previous change, it doesn't seem wise to back-patch this into
      already-released branches; but it should be OK to sneak it into 9.1.
      
      Noah Misch
      375aa7b3
  6. Jul 16, 2011
    • Tom Lane's avatar
      Add an errdetail_internal() ereport auxiliary routine. · ed7ed767
      Tom Lane authored
      This function supports untranslated detail messages, in the same way that
      errmsg_internal supports untranslated primary messages.  We've needed this
      for some time IMO, but discussion of some cases in the SSI code provided
      the impetus to actually add it.
      
      Kevin Grittner, with minor adjustments by me
      ed7ed767
  7. Apr 10, 2011
  8. Apr 07, 2011
    • Tom Lane's avatar
      Revise the API for GUC variable assign hooks. · 2594cf0e
      Tom Lane authored
      The previous functions of assign hooks are now split between check hooks
      and assign hooks, where the former can fail but the latter shouldn't.
      Aside from being conceptually clearer, this approach exposes the
      "canonicalized" form of the variable value to guc.c without having to do
      an actual assignment.  And that lets us fix the problem recently noted by
      Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus
      log messages about "parameter "wal_buffers" cannot be changed without
      restarting the server".  There may be some speed advantage too, because
      this design lets hook functions avoid re-parsing variable values when
      restoring a previous state after a rollback (they can store a pre-parsed
      representation of the value instead).  This patch also resolves a
      longstanding annoyance about custom error messages from variable assign
      hooks: they should modify, not appear separately from, guc.c's own message
      about "invalid parameter value".
      2594cf0e
  9. Apr 01, 2011
  10. Feb 17, 2011
  11. Jan 12, 2011
  12. Jan 01, 2011
  13. Nov 04, 2010
    • Tom Lane's avatar
      Use appendStringInfoString() where appropriate in elog.c. · 09211659
      Tom Lane authored
      The nominally equivalent call appendStringInfo(buf, "%s", str) can be
      significantly slower when str is large.  In particular, the former usage in
      EVALUATE_MESSAGE led to O(N^2) behavior when collecting a large number of
      context lines, as I found out while testing recursive functions.  The other
      changes are just neatnik-ism and seem unlikely to save anything meaningful,
      but a cycle shaved is a cycle earned.
      09211659
  14. Sep 20, 2010
  15. Aug 20, 2010
    • Tom Lane's avatar
      Bring some sanity to the trace_recovery_messages code and docs. · 79dc97a4
      Tom Lane authored
      Per gripe from Fujii Masao, though this is not exactly his proposed patch.
      Categorize as DEVELOPER_OPTIONS and set context PGC_SIGHUP, as per Fujii,
      but set the default to LOG because higher values aren't really sensible
      (see the code for trace_recovery()).  Fix the documentation to agree with
      the code and to try to explain what the variable actually does.  Get rid
      of no-op calls trace_recovery(LOG), which accomplish nothing except to
      demonstrate that this option confuses even its author.
      79dc97a4
  16. Jul 19, 2010
    • Tom Lane's avatar
      Remove unnecessary "Not safe to send CSV data" complaint from elog.c's fallback · cf5305f4
      Tom Lane authored
      path when CSV logging is configured but not yet operational.  It's sufficient
      to send the message to stderr, as we were already doing, and the "Not safe"
      gripe has already confused at least two core members ...
      
      Backpatch to 9.0, but not further --- doesn't seem appropriate to change
      this behavior in stable branches.
      cf5305f4
  17. May 08, 2010
    • Tom Lane's avatar
      Work around a subtle portability problem in use of printf %s format. · 54cd4f04
      Tom Lane authored
      Depending on which spec you read, field widths and precisions in %s may be
      counted either in bytes or characters.  Our code was assuming bytes, which
      is wrong at least for glibc's implementation, and in any case libc might
      have a different idea of the prevailing encoding than we do.  Hence, for
      portable results we must avoid using anything more complex than just "%s"
      unless the string to be printed is known to be all-ASCII.
      
      This patch fixes the cases I could find, including the psql formatting
      failure reported by Hernan Gonzalez.  In HEAD only, I also added comments
      to some places where it appears safe to continue using "%.*s".
      54cd4f04
  18. Feb 26, 2010
  19. Feb 17, 2010
  20. Jan 02, 2010
  21. Dec 19, 2009
    • Simon Riggs's avatar
      Allow read only connections during recovery, known as Hot Standby. · efc16ea5
      Simon Riggs authored
      Enabled by recovery_connections = on (default) and forcing archive recovery using a recovery.conf. Recovery processing now emulates the original transactions as they are replayed, providing full locking and MVCC behaviour for read only queries. Recovery must enter consistent state before connections are allowed, so there is a delay, typically short, before connections succeed. Replay of recovering transactions can conflict and in some cases deadlock with queries during recovery; these result in query cancellation after max_standby_delay seconds have expired. Infrastructure changes have minor effects on normal running, though introduce four new types of WAL record.
      
      New test mode "make standbycheck" allows regression tests of static command behaviour on a standby server while in recovery. Typical and extreme dynamic behaviours have been checked via code inspection and manual testing. Few port specific behaviours have been utilised, though primary testing has been on Linux only so far.
      
      This commit is the basic patch. Additional changes will follow in this release to enhance some aspects of behaviour, notably improved handling of conflicts, deadlock detection and query cancellation. Changes to VACUUM FULL are also required.
      
      Simon Riggs, with significant and lengthy review by Heikki Linnakangas, including streamlined redesign of snapshot creation and two-phase commit.
      
      Important contributions from Florian Pflug, Mark Kirkwood, Merlin Moncure, Greg Stark, Gianni Ciolli, Gabriele Bartolini, Hannu Krosing, Robert Haas, Tatsuo Ishii, Hiroyuki Yamada plus support and feedback from many other community members.
      efc16ea5
  22. Nov 29, 2009
  23. Oct 17, 2009
  24. Jul 03, 2009
  25. Jun 26, 2009
  26. Jun 11, 2009
  27. Jun 04, 2009
    • Tom Lane's avatar
      Improve the recently-added support for properly pluralized error messages · 76d4abf2
      Tom Lane authored
      by extending the ereport() API to cater for pluralization directly.  This
      is better than the original method of calling ngettext outside the elog.c
      code because (1) it avoids double translation, which wastes cycles and in
      the worst case could give a wrong result; and (2) it avoids having to use
      a different coding method in PL code than in the core backend.  The
      client-side uses of ngettext are not touched since neither of these concerns
      is very pressing in the client environment.  Per my proposal of yesterday.
      76d4abf2
  28. Mar 02, 2009
    • Tom Lane's avatar
      When we are in error recursion trouble, arrange to suppress translation and · fd9e2acc
      Tom Lane authored
      encoding conversion of any elog/ereport message being sent to the frontend.
      This generalizes a patch that I put in last October, which suppressed
      translation of only specific messages known to be associated with recursive
      can't-translate-the-message behavior.  As shown in bug #4680, we need a more
      general answer in order to have some hope of coping with broken encoding
      conversion setups.  This approach seems a good deal less klugy anyway.
      
      Patch in all supported branches.
      fd9e2acc
  29. Jan 19, 2009
  30. Jan 07, 2009
  31. Jan 01, 2009
  32. Oct 27, 2008
    • Tom Lane's avatar
      Install a more robust solution for the problem of infinite error-processing · b0169bb1
      Tom Lane authored
      recursion when we are unable to convert a localized error message to the
      client's encoding.  We've been over this ground before, but as reported by
      Ibrar Ahmed, it still didn't work in the case of conversion failures for
      the conversion-failure message itself :-(.  Fix by installing a "circuit
      breaker" that disables attempts to localize this message once we get into
      recursion trouble.
      
      Patch all supported branches, because it is in fact broken in all of them;
      though I had to add some missing translations to the older branches in
      order to expose the failure in the particular test case I was using.
      b0169bb1
  33. Oct 18, 2008
  34. Oct 09, 2008
  35. Sep 01, 2008
  36. Jul 09, 2008
    • Tom Lane's avatar
      Increase PG_SYSLOG_LIMIT (the max line length sent to syslog()) from 128 to · 6b7eebc0
      Tom Lane authored
      1024 to improve performance when sending large elog messages.  Also add a
      comment about why we use that number.
      
      Since this represents an externally visible behavior change, and might
      possibly result in portability issues, it seems best not to back-patch it.
      6b7eebc0
    • Tom Lane's avatar
      Fix performance bug in write_syslog(): the code to preferentially break the · 37933102
      Tom Lane authored
      log message at newlines cost O(N^2) for very long messages with few or no
      newlines.  For messages in the megabyte range this became the dominant cost.
      Per gripe from Achilleas Mantzios.
      
      Patch all the way back, since this is a safe change with no portability
      risks.  I am also thinking of increasing PG_SYSLOG_LIMIT, but that should
      be done separately.
      37933102
  37. Mar 24, 2008
  38. Mar 10, 2008
    • Magnus Hagander's avatar
      Implement enum type for guc parameters, and convert a couple of existing · 52a8d4f8
      Magnus Hagander authored
      variables to it. More need to be converted, but I wanted to get this in
      before it conflicts with too much...
      
      Other than just centralising the text-to-int conversion for parameters,
      this allows the pg_settings view to contain a list of available options
      and allows an error hint to show what values are allowed.
      52a8d4f8
Loading