1. 06 9月, 2009 1 次提交
  2. 04 9月, 2009 6 次提交
    • H
      Fix encoding handling in xml binary input function. If the XML header didn't · 691efa15
      Heikki Linnakangas 提交于
      specify an encoding explicitly, we used to treat it as being in database
      encoding when we parsed it, but then perform a UTF-8 -> database encoding
      conversion on it, which was completely bogus. It's now consistently treated as
      UTF-8.
      691efa15
    • M
      · e01fdca9
      Marc G. Fournier 提交于
      Tag 8.3.8
      e01fdca9
    • T
      7e2024be
    • T
      Make LOAD of an already-loaded library into a no-op, instead of attempting · 5927d9f6
      Tom Lane 提交于
      to unload and re-load the library.
      
      The difficulty with unloading a library is that we haven't defined safe
      protocols for doing so.  In particular, there's no safe mechanism for
      getting out of a "hook" function pointer unless libraries are unloaded
      in reverse order of loading.  And there's no mechanism at all for undefining
      a custom GUC variable, so GUC would be left with a pointer to an old value
      that might or might not still be valid, and very possibly wouldn't be in
      the same place anymore.
      
      While the unload and reload behavior had some usefulness in easing
      development of new loadable libraries, it's of no use whatever to normal
      users, so just disabling it isn't giving up that much.  Someday we might
      care to expend the effort to develop safe unload protocols; but even if
      we did, there'd be little certainty that every third-party loadable module
      was following them, so some security restrictions would still be needed.
      
      Back-patch to 8.2; before that, LOAD was superuser-only anyway.
      
      Security: unprivileged users could crash backend.  CVE not assigned yet
      5927d9f6
    • T
      Disallow RESET ROLE and RESET SESSION AUTHORIZATION inside security-definer · fe8170dc
      Tom Lane 提交于
      functions.
      
      This extends the previous patch that forbade SETting these variables inside
      security-definer functions.  RESET is equally a security hole, since it
      would allow regaining privileges of the caller; furthermore it can trigger
      Assert failures and perhaps other internal errors, since the code is not
      expecting these variables to change in such contexts.  The previous patch
      did not cover this case because assign hooks don't really have enough
      information, so move the responsibility for preventing this into guc.c.
      
      Problem discovered by Heikki Linnakangas.
      
      Security: no CVE assigned yet, extends CVE-2007-6600
      fe8170dc
    • P
      Translation updates · 095f7ba3
      Peter Eisentraut 提交于
      095f7ba3
  3. 03 9月, 2009 1 次提交
  4. 02 9月, 2009 1 次提交
    • T
      Fix pg_ctl's readfile() to not go into infinite loop on an empty file · bcdb5788
      Tom Lane 提交于
      (could happen if either postgresql.conf or postmaster.opts is empty).
      It's been broken since the C version was written for 8.0, so patch
      all the way back.
      
      initdb's copy of the function is broken in the same way, but it's
      less important there since the input files should never be empty.
      Patch that in HEAD only, and also fix some cosmetic differences that
      crept into that copy of the function.
      
      Per report from Corry Haines and Jeff Davis.
      bcdb5788
  5. 31 8月, 2009 1 次提交
  6. 27 8月, 2009 1 次提交
  7. 25 8月, 2009 2 次提交
    • A
      Avoid calling kill() in a postmaster signal handler. · fa837ad6
      Alvaro Herrera 提交于
      This causes problems when the system load is high, per report from Zdenek
      Kotala in <1250860954.1239.114.camel@localhost>; instead of calling kill
      directly, have the signal handler set a flag which is checked in ServerLoop.
      This way, the handler can return before being called again by a subsequent
      signal sent from the autovacuum launcher.  Also, increase the sleep in the
      launcher in this failure path to 1 second.
      
      Backpatch to 8.3, which is when the signalling between autovacuum
      launcher/postmaster was introduced.
      
      Also, add a couple of ReleasePostmasterChildSlot calls in error paths; this
      part backpatched to 8.4 which is when the child slot stuff was introduced.
      fa837ad6
    • T
      Fix inclusions of readline/editline header files so that we only attempt to · b040178c
      Tom Lane 提交于
      #include the version of history.h that is in the same directory as the
      readline.h we are using.  This avoids problems in some scenarios where both
      readline and editline are installed.  Report and patch by Zdenek Kotala.
      b040178c
  8. 19 8月, 2009 1 次提交
  9. 17 8月, 2009 2 次提交
  10. 16 8月, 2009 1 次提交
  11. 13 8月, 2009 1 次提交
    • T
      Fix old bug in log_autovacuum_min_duration code: it was relying on being able · 355e7ef4
      Tom Lane 提交于
      to access a Relation entry it had just closed.  I happened to be testing with
      CLOBBER_CACHE_ALWAYS, which made this a guaranteed core dump (at least on
      machines where sprintf %s isn't forgiving of a NULL pointer).  It's probably
      quite unlikely that it would fail in the field, but a bug is a bug.  Fix by
      moving the relation_close call down past the logging action.
      355e7ef4
  12. 11 8月, 2009 1 次提交
  13. 10 8月, 2009 2 次提交
  14. 08 8月, 2009 1 次提交
    • T
      Try to defend against the possibility that libpq is still in COPY_IN state · d9a00ebb
      Tom Lane 提交于
      when we reach the post-COPY "pump it dry" error recovery code that was added
      2006-11-24.  Per a report from Neil Best, there is at least one code path
      in which this occurs, leading to an infinite loop in code that's supposed
      to be making it more robust not less so.  A reasonable response seems to be
      to call PQputCopyEnd() again, so let's try that.
      
      Back-patch to all versions that contain the cleanup loop.
      d9a00ebb
  15. 07 8月, 2009 1 次提交
  16. 30 7月, 2009 1 次提交
  17. 29 7月, 2009 1 次提交
  18. 28 7月, 2009 1 次提交
  19. 25 7月, 2009 1 次提交
  20. 21 7月, 2009 1 次提交
  21. 18 7月, 2009 1 次提交
    • T
      Repair bug #4926 "too few pathkeys for mergeclauses". This example shows · d7bc5e30
      Tom Lane 提交于
      that the sanity checking I added to create_mergejoin_plan() in 8.3 was a
      few bricks shy of a load: the mergeclauses could reference pathkeys in a
      noncanonical order such as x,y,x, not only cases like x,x,y which is all
      that the code had allowed for.  The odd cases only turn up when using
      redundant clauses in an outer join condition, which is why no one had
      noticed before.
      d7bc5e30
  22. 14 7月, 2009 1 次提交
    • T
      Do a conditional SPI_push/SPI_pop when replanning a query in · b5f32d8d
      Tom Lane 提交于
      RevalidateCachedPlan.  This is to avoid a "SPI_ERROR_CONNECT" failure when
      the planner calls a SPI-using function and we are already inside one.
      The alternative fix is to expect callers of RevalidateCachedPlan to do this,
      which seems likely to result in additional hard-to-detect bugs of omission.
      Per reports from Frank van Vugt and Marek Lewczuk.
      
      Back-patch to 8.3. It's much harder to trigger the bug in 8.3, due to a
      smaller set of cases in which plans can be invalidated, but it could happen.
      (I think perhaps only a SI reset event could make 8.3 fail here, but that's
      certainly within the realm of possibility.)
      b5f32d8d
  23. 10 7月, 2009 1 次提交
    • T
      Fix xslt_process() to ensure that it inserts a NULL terminator after the · 12010081
      Tom Lane 提交于
      last pair of parameter name/value strings, even when there are MAXPARAMS
      of them.  Aboriginal bug in contrib/xml2, noted while studying bug #4912
      (though I'm not sure whether there's something else involved in that
      report).
      
      This might be thought a security issue, since it's a potential backend
      crash; but considering that untrustworthy users shouldn't be allowed
      to get their hands on xslt_process() anyway, it's probably not worth
      getting excited about.
      12010081
  24. 07 7月, 2009 1 次提交
  25. 25 6月, 2009 1 次提交
  26. 24 6月, 2009 1 次提交
    • T
      Fix an ancient error in dist_ps (distance from point to line segment), which · 462c280f
      Tom Lane 提交于
      a number of other geometric operators also depend on.  It miscalculated the
      slope of the perpendicular to the given line segment anytime that slope was
      other than 0, infinite, or +/-1.  In some cases the error would be masked
      because the true closest point on the line segment was one of its endpoints
      rather than the intersection point, but in other cases it could give an
      arbitrarily bad answer.  Per bug #4872 from Nick Roosevelt.
      
      Bug goes clear back to Berkeley days, so patch all supported branches.
      Make a couple of cosmetic adjustments while at it.
      462c280f
  27. 18 6月, 2009 1 次提交
  28. 14 6月, 2009 1 次提交
    • T
      Change test tables in copy2 regression test to be temporary tables. · 5b2e5fed
      Tom Lane 提交于
      This prevents autovacuum from reclaiming free space in them and causing
      the test's output row order to change, which is causing intermittent
      bogus failure reports in the buildfarm.
      
      Backpatch to 8.3.  The issue exists further back, but since autovacuum was
      not on by default before 8.3, it's not a problem for buildfarm testing.
      5b2e5fed
  29. 12 6月, 2009 1 次提交
  30. 11 6月, 2009 3 次提交