1. 28 10月, 2010 1 次提交
  2. 27 10月, 2010 1 次提交
  3. 21 10月, 2010 1 次提交
  4. 20 10月, 2010 1 次提交
    • T
      Fix ecpg test building process to not generate *.dSYM junk on Macs. · d109b10e
      Tom Lane 提交于
      The trick is to not try to build executables directly from .c files,
      but to always build the intermediate .o files.  For obscure reasons,
      Darwin's version of gcc will leave debug cruft behind in the first
      case but not the second.  Per complaint from Robert Haas.
      d109b10e
  5. 19 10月, 2010 1 次提交
  6. 12 10月, 2010 1 次提交
    • T
      Fix assorted bugs in GIN's WAL replay logic. · 2afd044c
      Tom Lane 提交于
      The original coding was quite sloppy about handling the case where
      XLogReadBuffer fails (because the page has since been deleted).  This
      would result in either "bad buffer id: 0" or an Assert failure during
      replay, if indeed the page were no longer there.  In a couple of places
      it also neglected to check whether the change had already been applied,
      which would probably result in corrupted index contents.  I believe that
      bug #5703 is an instance of the first problem.  These issues could show up
      without replication, but only if you were unfortunate enough to crash
      between modification of a GIN index and the next checkpoint.
      
      Back-patch to 8.2, which is as far back as GIN has WAL support.
      2afd044c
  7. 08 10月, 2010 2 次提交
  8. 03 10月, 2010 1 次提交
    • T
      Behave correctly if INSERT ... VALUES is decorated with additional clauses. · 392c66f1
      Tom Lane 提交于
      In versions 8.2 and up, the grammar allows attaching ORDER BY, LIMIT,
      FOR UPDATE, or WITH to VALUES, and hence to INSERT ... VALUES.  But the
      special-case code for VALUES in transformInsertStmt() wasn't expecting any
      of those, and just ignored them, leading to unexpected results.  Rather
      than complicate the special-case path, just ensure that the presence of any
      of those clauses makes us treat the query as if it had a general SELECT.
      Per report from Hitoshi Harada.
      392c66f1
  9. 01 10月, 2010 4 次提交
    • M
      Tag 8.3.12 · e32229ad
      Marc G. Fournier 提交于
      e32229ad
    • T
      Use a separate interpreter for each calling SQL userid in plperl and pltcl. · 3b4c327c
      Tom Lane 提交于
      There are numerous methods by which a Perl or Tcl function can subvert
      the behavior of another such function executed later; for example, by
      redefining standard functions or operators called by the target function.
      If the target function is SECURITY DEFINER, or is called by such a
      function, this means that any ordinary SQL user with Perl or Tcl language
      usage rights can do essentially anything with the privileges of the target
      function's owner.
      
      To close this security hole, create a separate Perl or Tcl interpreter for
      each SQL userid under which plperl or pltcl functions are executed within
      a session.  However, all plperlu or pltclu functions run within a session
      still share a single interpreter, since they all execute at the trust
      level of a database superuser anyway.
      
      Note: this change results in a functionality loss when libperl has been
      built without the "multiplicity" option: it's no longer possible to call
      plperl functions under different userids in one session, since such a
      libperl can't support multiple interpreters in one process.  However, such
      a libperl already failed to support concurrent use of plperl and plperlu,
      so it's likely that few people use such versions with Postgres.
      
      Security: CVE-2010-3433
      3b4c327c
    • P
      Translation updates for 8.3.12 · 65a192c4
      Peter Eisentraut 提交于
      65a192c4
    • T
      Update release notes for releases 9.0.1, 8.4.5, 8.3.12, 8.2.18, 8.1.22, · f7282fc9
      Tom Lane 提交于
      8.0.26, and 7.4.30.
      f7282fc9
  10. 29 9月, 2010 3 次提交
    • M
      Treat exit code 128 (ERROR_WAIT_NO_CHILDREN) as non-fatal on Win32, · 26b01668
      Magnus Hagander 提交于
      since it can happen when a process fails to start when the system
      is under high load.
      
      Per several bug reports and many peoples investigation.
      
      Back-patch to 8.2, since testing shows no issues even though the
      "deadman-switch" does not exist  in this version.
      26b01668
    • T
      Fix incorrect usage of non-strict OR joinclauses in appendrel indexscans. · a2e26a6f
      Tom Lane 提交于
      By chance I happened to notice that bug #5076 was still broken in the
      8.3 branch, though it worked everywhere else.  The reason is that 8.3's
      version of adjust_appendrel_attrs_mutator neglected to adjust
      RestrictInfo.nullable_relids.  This was an oversight in my patch of
      2009-04-16, which I apparently corrected in the later branches on
      2009-08-13 without realizing that it affected the 8.3 branch as well.
      By the time the bug report was filed, it was not reproducible in 8.4.
      I don't recall if I wrote it off as already fixed, or it just fell through
      the cracks; but anyway it's been a live bug in 8.3 for a year.
      a2e26a6f
    • T
      Fix another small oversight in command_no_begin patch. · 3e20490e
      Tom Lane 提交于
      Need a "return false" to prevent tests from continuing after we've moved
      the "query" pointer.  As it stood, it'd accept "DROP DISCARD ALL" as a
      match.
      3e20490e
  11. 28 9月, 2010 2 次提交
  12. 26 9月, 2010 1 次提交
    • T
      Further fixes to the pg_get_expr() security fix in back branches. · a824c59c
      Tom Lane 提交于
      It now emerges that the JDBC driver expects to be able to use pg_get_expr()
      on an output of a sub-SELECT.  So extend the check logic to be able to recurse
      into a sub-SELECT to see if the argument is ultimately coming from an
      appropriate column.  Per report from Thomas Kellerer.
      a824c59c
  13. 25 9月, 2010 1 次提交
  14. 24 9月, 2010 3 次提交
    • R
      Add contrib/xml2/pgxml.sql to .gitignore · 10079198
      Robert Haas 提交于
      Kevin Grittner
      10079198
    • T
      Prevent show_session_authorization from crashing when session_authorization · 7548ecb3
      Tom Lane 提交于
      hasn't been set.
      
      The only known case where this can happen is when show_session_authorization
      is invoked in an autovacuum process, which is possible if an index function
      calls it, as for example in bug #5669 from Andrew Geery.  We could perhaps
      try to return a sensible value, such as the name of the cluster-owning
      superuser; but that seems like much more trouble than the case is worth,
      and in any case it could create new possible failure modes.  Simply
      returning an empty string seems like the most appropriate fix.
      
      Back-patch to all supported versions, even those before autovacuum, just
      in case there's another way to provoke this crash.
      7548ecb3
    • T
      Avoid sharing subpath list structure when flattening nested AppendRels. · 9e20bdf9
      Tom Lane 提交于
      In some situations the original coding led to corrupting the child AppendRel's
      subpaths list, effectively adding other members of the parent's list to it.
      This was usually masked because we never made any further use of the child's
      list, but given the right combination of circumstances, we could do so.  The
      visible symptom would be a relation getting scanned twice, as in bug #5673
      from David Schmitt.
      
      Backpatch to 8.2, which is as far back as the risky coding appears.  The
      example submitted by David only fails in 8.4 and later, but I'm not convinced
      that there aren't any even-more-obscure cases where 8.2 and 8.3 would fail.
      9e20bdf9
  15. 23 9月, 2010 6 次提交
  16. 22 9月, 2010 2 次提交
  17. 02 9月, 2010 1 次提交
    • T
      Fix up flushing of composite-type typcache entries to be driven directly by · a15e220a
      Tom Lane 提交于
      SI invalidation events, rather than indirectly through the relcache.
      
      In the previous coding, we had to flush a composite-type typcache entry
      whenever we discarded the corresponding relcache entry.  This caused problems
      at least when testing with RELCACHE_FORCE_RELEASE, as shown in recent report
      from Jeff Davis, and might result in real-world problems given the kind of
      unexpected relcache flush that that test mechanism is intended to model.
      
      The new coding decouples relcache and typcache management, which is a good
      thing anyway from a structural perspective.  The cost is that we have to
      search the typcache linearly to find entries that need to be flushed.  There
      are a couple of ways we could avoid that, but at the moment it's not clear
      it's worth any extra trouble, because the typcache contains very few entries
      in typical operation.
      
      Back-patch to 8.2, the same as some other recent fixes in this general area.
      The patch could be carried back to 8.0 with some additional work, but given
      that it's only hypothetical whether we're fixing any problem observable in
      the field, it doesn't seem worth the work now.
      a15e220a
  18. 30 8月, 2010 1 次提交
    • T
      Reduce PANIC to ERROR in some occasionally-reported btree failure cases. · 83ba488c
      Tom Lane 提交于
      This patch changes _bt_split() and _bt_pagedel() to throw a plain ERROR,
      rather than PANIC, for several cases that are reported from the field
      from time to time:
      * right sibling's left-link doesn't match;
      * PageAddItem failure during _bt_split();
      * parent page's next child isn't right sibling during _bt_pagedel().
      In addition the error messages for these cases have been made a bit
      more verbose, with additional values included.
      
      The original motivation for PANIC here was to capture core dumps for
      subsequent analysis.  But with so many users whose platforms don't capture
      core dumps by default, or who are unprepared to analyze them anyway, it's hard
      to justify a forced database restart when we can fairly easily detect the
      problems before we've reached the critical sections where PANIC would be
      necessary.  It is not currently known whether the reports of these messages
      indicate well-hidden bugs in Postgres, or are a result of storage-level
      malfeasance; the latter possibility suggests that we ought to try to be more
      robust even if there is a bug here that's ultimately found.
      
      Backpatch to 8.2.  The code before that is sufficiently different that
      it doesn't seem worth the trouble to back-port further.
      83ba488c
  19. 29 8月, 2010 1 次提交
  20. 27 8月, 2010 2 次提交
    • T
      Update time zone data files to tzdata release 2010l: DST law changes in · 79beb905
      Tom Lane 提交于
      Egypt and Palestine.  Added new names for two Micronesian timezones:
      Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
      abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
      Pacific/Ponape.  Historical corrections for Finland.
      79beb905
    • T
      Fix ExecMakeTableFunctionResult to verify that all rows returned by a SRF · dcfaed3a
      Tom Lane 提交于
      returning "record" actually do have the same rowtype.  This is needed because
      the parser can't realistically enforce that they will all have the same typmod,
      as seen in a recent example from David Wheeler.
      
      Back-patch to 8.0, which is as far back as we have the notion of RECORD
      subtypes being distinguished by typmod.  Wheeler's example depends on
      8.4-and-up features, but I suspect there may be ways to provoke similar
      failures before 8.4.
      dcfaed3a
  21. 26 8月, 2010 1 次提交
  22. 20 8月, 2010 1 次提交
    • T
      Keep exec_simple_check_plan() from thinking "SELECT foo INTO bar" is simple. · 9005604c
      Tom Lane 提交于
      It's not clear if this situation can occur in plpgsql other than via the
      EXECUTE USING case Heikki illustrated, which I will shortly close off.
      However, ignoring the intoClause if it's there is surely wrong, so let's
      patch it for safety.
      
      Backpatch to 8.3, which is as far back as this code has a PlannedStmt
      to deal with.  There might be another way to make an equivalent test
      before that, but since this is just preventing hypothetical bugs,
      I'm not going to obsess about it.
      9005604c
  23. 18 8月, 2010 1 次提交
    • T
      Add missing handling of PlannedStmt.transientPlan in copyfuncs/outfuncs. · 12bc6546
      Tom Lane 提交于
      _outPlannedStmt is only debug support, so the omission there was not very
      serious, but the omission in _copyPlannedStmt is a real bug.  The consequence
      would be that a copied plan tree would never be marked as a transient plan,
      so that we would forget we ought to replan it after some not-yet-ready index
      becomes ready for use.  This might explain some past complaints about indexes
      created with CREATE INDEX CONCURRENTLY not being used right away.  Problem
      spotted by Yeb Havinga.
      
      Back-patch to 8.3, where the field was added.
      12bc6546
  24. 17 8月, 2010 1 次提交