1. 05 2月, 2009 1 次提交
  2. 02 2月, 2009 1 次提交
  3. 27 1月, 2009 1 次提交
  4. 23 1月, 2009 2 次提交
  5. 16 1月, 2009 1 次提交
  6. 09 1月, 2009 2 次提交
  7. 20 12月, 2008 2 次提交
  8. 19 12月, 2008 1 次提交
  9. 22 11月, 2008 1 次提交
  10. 10 11月, 2008 2 次提交
  11. 31 10月, 2008 1 次提交
  12. 18 10月, 2008 1 次提交
    • T
      Add a new column to pg_am to specify whether an index AM supports backward · e4fb8ff0
      Tom Lane 提交于
      scanning; GiST and GIN do not, and it seems like too much trouble to make
      them do so.  By teaching ExecSupportsBackwardScan() about this restriction,
      we ensure that the planner will protect a scroll cursor from the problem
      by adding a Materialize node.
      
      In passing, fix another longstanding bug in the same area: backwards scan of
      a plan with set-returning functions in the targetlist did not work either,
      since the TupFromTlist expansion code pays no attention to direction (and
      has no way to run a SRF backwards anyway).  Again the fix is to make
      ExecSupportsBackwardScan check this restriction.
      
      Also adjust the index AM API specification to note that mark/restore support
      is unnecessary if the AM can't produce ordered output.
      e4fb8ff0
  13. 06 10月, 2008 2 次提交
  14. 23 9月, 2008 1 次提交
  15. 20 9月, 2008 1 次提交
  16. 16 9月, 2008 1 次提交
    • T
      Change hash indexes to store only the hash code rather than the whole indexed · 4adc2f72
      Tom Lane 提交于
      value.  This means that hash index lookups are always lossy and have to be
      rechecked when the heap is visited; however, the gain in index compactness
      outweighs this when the indexed values are wide.  Also, we only need to
      perform datatype comparisons when the hash codes match exactly, rather than
      for every entry in the hash bucket; so it could also win for datatypes that
      have expensive comparison functions.  A small additional win is gained by
      keeping hash index pages sorted by hash code and using binary search to reduce
      the number of index tuples we have to look at.
      
      Xiao Meng
      
      This commit also incorporates Zdenek Kotala's patch to isolate hash metapages
      and hash bitmaps a bit better from the page header datastructures.
      4adc2f72
  17. 11 9月, 2008 1 次提交
  18. 31 7月, 2008 1 次提交
    • T
      Replace the hard-wired type knowledge in TypeCategory() and IsPreferredType() · bac3e836
      Tom Lane 提交于
      with system catalog lookups, as was foreseen to be necessary almost since
      their creation.  Instead put the information into two new pg_type columns,
      typcategory and typispreferred.  Add support for setting these when
      creating a user-defined base type.
      
      The category column is just a "char" (i.e. a poor man's enum), allowing
      a crude form of user extensibility of the category list: just use an
      otherwise-unused character.  This seems sufficient for foreseen uses,
      but we could upgrade to having an actual category catalog someday, if
      there proves to be a huge demand for custom type categories.
      
      In this patch I have attempted to hew exactly to the behavior of the
      previous hardwired logic, except for introducing new type categories for
      arrays, composites, and enums.  In particular the default preferred state
      for user-defined types remains TRUE.  That seems worth revisiting, but it
      should be done as a separate patch from introducing the infrastructure.
      Likewise, any adjustment of the standard set of categories should be done
      separately.
      bac3e836
  19. 18 7月, 2008 1 次提交
  20. 17 7月, 2008 1 次提交
    • T
      Add a "provariadic" column to pg_proc to eliminate the remarkably expensive · 6563e9e2
      Tom Lane 提交于
      need to deconstruct proargmodes for each pg_proc entry inspected by
      FuncnameGetCandidates().  Fixes function lookup performance regression
      caused by yesterday's variadic-functions patch.
      
      In passing, make pg_proc.probin be NULL, rather than a dummy value '-',
      in cases where it is not actually used for the particular type of function.
      This should buy back some of the space cost of the extra column.
      6563e9e2
  21. 16 7月, 2008 1 次提交
    • T
      Support "variadic" functions, which can accept a variable number of arguments · d89737d3
      Tom Lane 提交于
      so long as all the trailing arguments are of the same (non-array) type.
      The function receives them as a single array argument (which is why they
      have to all be the same type).
      
      It might be useful to extend this facility to aggregates, but this patch
      doesn't do that.
      
      This patch imposes a noticeable slowdown on function lookup --- a follow-on
      patch will fix that by adding a redundant column to pg_proc.
      
      Pavel Stehule
      d89737d3
  22. 14 7月, 2008 1 次提交
    • T
      Create a type-specific typanalyze routine for tsvector, which collects stats · 6f6d8632
      Tom Lane 提交于
      on the most common individual lexemes in place of the mostly-useless default
      behavior of counting duplicate tsvectors.  Future work: create selectivity
      estimation functions that actually do something with these stats.
      
      (Some other things we ought to look at doing: using the Lossy Counting
      algorithm in compute_minimal_stats, and using the element-counting idea for
      stats on regular arrays.)
      
      Jan Urbanski
      6f6d8632
  23. 11 7月, 2008 1 次提交
  24. 10 5月, 2008 1 次提交
    • T
      Change the rules for inherited CHECK constraints to be essentially the same · cd902b33
      Tom Lane 提交于
      as those for inherited columns; that is, it's no longer allowed for a child
      table to not have a check constraint matching one that exists on a parent.
      This satisfies the principle of least surprise (rows selected from the parent
      will always appear to meet its check constraints) and eliminates some
      longstanding bogosity in pg_dump, which formerly had to guess about whether
      check constraints were really inherited or not.
      
      The implementation involves adding conislocal and coninhcount columns to
      pg_constraint (paralleling attislocal and attinhcount in pg_attribute)
      and refactoring various ALTER TABLE actions to be more like those for
      columns.
      
      Alex Hunsaker, Nikhil Sontakke, Tom Lane
      cd902b33
  25. 15 4月, 2008 1 次提交
    • T
      Push index operator lossiness determination down to GIST/GIN opclass · 9b5c8d45
      Tom Lane 提交于
      "consistent" functions, and remove pg_amop.opreqcheck, as per recent
      discussion.  The main immediate benefit of this is that we no longer need
      8.3's ugly hack of requiring @@@ rather than @@ to test weight-using tsquery
      searches on GIN indexes.  In future it should be possible to optimize some
      other queries better than is done now, by detecting at runtime whether the
      index match is exact or not.
      
      Tom Lane, after an idea of Heikki's, and with some help from Teodor.
      9b5c8d45
  26. 11 4月, 2008 1 次提交
    • T
      Replace "amgetmulti" AM functions with "amgetbitmap", in which the whole · 4e82a954
      Tom Lane 提交于
      indexscan always occurs in one call, and the results are returned in a
      TIDBitmap instead of a limited-size array of TIDs.  This should improve
      speed a little by reducing AM entry/exit overhead, and it is necessary
      infrastructure if we are ever to support bitmap indexes.
      
      In an only slightly related change, add support for TIDBitmaps to preserve
      (somewhat lossily) the knowledge that particular TIDs reported by an index
      need to have their quals rechecked when the heap is visited.  This facility
      is not really used yet; we'll need to extend the forced-recheck feature to
      plain indexscans before it's useful, and that hasn't been coded yet.
      The intent is to use it to clean up 8.3's horrid @@@ kluge for text search
      with weighted queries.  There might be other uses in future, but that one
      alone is sufficient reason.
      
      Heikki Linnakangas, with some adjustments by me.
      4e82a954
  27. 10 3月, 2008 1 次提交
    • M
      Implement enum type for guc parameters, and convert a couple of existing · 52a8d4f8
      Magnus Hagander 提交于
      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
  28. 07 3月, 2008 1 次提交
  29. 01 2月, 2008 1 次提交
  30. 29 1月, 2008 1 次提交
  31. 02 10月, 2007 1 次提交
  32. 21 9月, 2007 1 次提交
    • T
      HOT updates. When we update a tuple without changing any of its indexed · 282d2a03
      Tom Lane 提交于
      columns, and the new version can be stored on the same heap page, we no longer
      generate extra index entries for the new version.  Instead, index searches
      follow the HOT-chain links to ensure they find the correct tuple version.
      
      In addition, this patch introduces the ability to "prune" dead tuples on a
      per-page basis, without having to do a complete VACUUM pass to recover space.
      VACUUM is still needed to clean up dead index entries, however.
      
      Pavan Deolasee, with help from a bunch of other people.
      282d2a03
  33. 06 9月, 2007 1 次提交
    • T
      Implement lazy XID allocation: transactions that do not modify any database · 295e6398
      Tom Lane 提交于
      rows will normally never obtain an XID at all.  We already did things this way
      for subtransactions, but this patch extends the concept to top-level
      transactions.  In applications where there are lots of short read-only
      transactions, this should improve performance noticeably; not so much from
      removal of the actual XID-assignments, as from reduction of overhead that's
      driven by the rate of XID consumption.  We add a concept of a "virtual
      transaction ID" so that active transactions can be uniquely identified even
      if they don't have a regular XID.  This is a much lighter-weight concept:
      uniqueness of VXIDs is only guaranteed over the short term, and no on-disk
      record is made about them.
      
      Florian Pflug, with some editorialization by Tom.
      295e6398
  34. 03 9月, 2007 1 次提交
  35. 21 6月, 2007 1 次提交