Skip to content
Snippets Groups Projects
  1. Oct 20, 2008
  2. Oct 17, 2008
    • Teodor Sigaev's avatar
      During repeated rescan of GiST index it's possible that scan key · beeb3562
      Teodor Sigaev authored
      is NULL but SK_SEARCHNULL is not set. Add checking IS NULL of keys
      to set during key initialization. If key is NULL and SK_SEARCHNULL is not
      set then nothnig can be satisfied.
      With assert-enabled compilation that causes coredump.
      
      Bug was introduced in 8.3 by support of IS NULL index scan.
      beeb3562
  3. Aug 23, 2008
  4. Jun 19, 2008
  5. May 12, 2008
    • Alvaro Herrera's avatar
      Restructure some header files a bit, in particular heapam.h, by removing some · f8c4d7db
      Alvaro Herrera authored
      unnecessary #include lines in it.  Also, move some tuple routine prototypes and
      macros to htup.h, which allows removal of heapam.h inclusion from some .c
      files.
      
      For this to work, a new header file access/sysattr.h needed to be created,
      initially containing attribute numbers of system columns, for pg_dump usage.
      
      While at it, make contrib ltree, intarray and hstore header files more
      consistent with our header style.
      f8c4d7db
  6. Apr 14, 2008
    • Tom Lane's avatar
      Push index operator lossiness determination down to GIST/GIN opclass · 9b5c8d45
      Tom Lane authored
      "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
  7. Apr 13, 2008
    • Tom Lane's avatar
      Phase 2 of project to make index operator lossiness be determined at runtime · 24558da1
      Tom Lane authored
      instead of plan time.  Extend the amgettuple API so that the index AM returns
      a boolean indicating whether the indexquals need to be rechecked, and make
      that rechecking happen in nodeIndexscan.c (currently the only place where
      it's expected to be needed; other callers of index_getnext are just erroring
      out for now).  For the moment, GIN and GIST have stub logic that just always
      sets the recheck flag to TRUE --- I'm hoping to get Teodor to handle pushing
      that control down to the opclass consistent() functions.  The planner no
      longer pays any attention to amopreqcheck, and that catalog column will go
      away in due course.
      24558da1
  8. Apr 11, 2008
    • Tom Lane's avatar
      Replace "amgetmulti" AM functions with "amgetbitmap", in which the whole · 4e82a954
      Tom Lane authored
      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
  9. Jan 01, 2008
  10. Nov 15, 2007
  11. Sep 13, 2007
    • Tom Lane's avatar
      Redefine the lp_flags field of item pointers as having four states, rather · 68893035
      Tom Lane authored
      than two independent bits (one of which was never used in heap pages anyway,
      or at least hadn't been in a very long time).  This gives us flexibility to
      add the HOT notions of redirected and dead item pointers without requiring
      anything so klugy as magic values of lp_off and lp_len.  The state values
      are chosen so that for the states currently in use (pre-HOT) there is no
      change in the physical representation.
      68893035
  12. May 27, 2007
    • Tom Lane's avatar
      Fix up pgstats counting of live and dead tuples to recognize that committed · 77947c51
      Tom Lane authored
      and aborted transactions have different effects; also teach it not to assume
      that prepared transactions are always committed.
      
      Along the way, simplify the pgstats API by tying counting directly to
      Relations; I cannot detect any redeeming social value in having stats
      pointers in HeapScanDesc and IndexScanDesc structures.  And fix a few
      corner cases in which counts might be missed because the relation's
      pgstat_info pointer hadn't been set.
      77947c51
  13. Apr 07, 2007
  14. Jan 20, 2007
  15. Jan 05, 2007
  16. Nov 12, 2006
  17. Oct 04, 2006
  18. Jul 14, 2006
  19. Jul 11, 2006
  20. Jun 28, 2006
    • Teodor Sigaev's avatar
      Changes · 1f7ef548
      Teodor Sigaev authored
      * new split algorithm (as proposed in http://archives.postgresql.org/pgsql-hackers/2006-06/msg00254.php)
        * possible call pickSplit() for second and below columns
        * add spl_(l|r)datum_exists to GIST_SPLITVEC -
          pickSplit should check its values to use already defined
          spl_(l|r)datum for splitting. pickSplit should set
          spl_(l|r)datum_exists to 'false' (if they was 'true') to
          signal to caller about using spl_(l|r)datum.
        * support for old pickSplit(): not very optimal
          but correct split
      * remove 'bytes' field from GISTENTRY: in any case size of
        value is defined by it's type.
      * split GIST_SPLITVEC to two structures: one for using in picksplit
        and second - for internal use.
      * some code refactoring
      * support of subsplit to rtree opclasses
      
      TODO: add support of subsplit to contrib modules
      1f7ef548
  21. May 24, 2006
    • Teodor Sigaev's avatar
      * Add support NULL to GiST. · d2158b02
      Teodor Sigaev authored
      * some refactoring and simplify code int gistutil.c and gist.c
      * now in some cases it can be called used-defined
        picksplit method for non-first column in index, but here
      	is a place to do more.
      * small fix of docs related to support NULL.
      d2158b02
  22. Mar 05, 2006
  23. Jan 14, 2006
    • Tom Lane's avatar
      Some minor code cleanup, falling out from the removal of rtree. SK_NEGATE · f7ea9312
      Tom Lane authored
      isn't being used anywhere anymore, and there seems no point in a generic
      index_keytest() routine when two out of three remaining access methods
      aren't using it.  Also, add a comment documenting a convention for
      letting access methods define private flag bits in ScanKey sk_flags.
      There are no such flags at the moment but I'm thinking about changing
      btree's handling of "required keys" to use flag bits in the keys
      rather than a count of required key positions.  Also, if some AM did
      still want SK_NEGATE then it would be reasonable to treat it as a private
      flag bit.
      f7ea9312
  24. Nov 22, 2005
  25. Nov 06, 2005
  26. Oct 06, 2005
    • Tom Lane's avatar
      Revise pgstats stuff to fix the problems with not counting accesses · cb8b6618
      Tom Lane authored
      generated by bitmap index scans.  Along the way, simplify and speed up
      the code for counting sequential and index scans; it was both confusing
      and inefficient to be taking care of that in the per-tuple loops, IMHO.
      initdb forced because of internal changes in pg_stat view definitions.
      cb8b6618
  27. Sep 22, 2005
  28. Jun 27, 2005
    • Teodor Sigaev's avatar
      Concurrency for GiST · e8cab5fe
      Teodor Sigaev authored
      - full concurrency for insert/update/select/vacuum:
              - select and vacuum never locks more than one page simultaneously
              - select (gettuple) hasn't any lock across it's calls
              - insert never locks more than two page simultaneously:
                      - during search of leaf to insert it locks only one page
                        simultaneously
                      - while walk upward to the root it locked only parent (may be
                        non-direct parent) and child. One of them X-lock, another may
                        be S- or X-lock
      - 'vacuum full' locks index
      - improve gistgetmulti
      - simplify XLOG records
      
      Fix bug in index_beginscan_internal: LockRelation may clean
        rd_aminfo structure, so move GET_REL_PROCEDURE after LockRelation
      e8cab5fe
  29. Jun 20, 2005
    • Teodor Sigaev's avatar
      1. full functional WAL for GiST · d544ec8b
      Teodor Sigaev authored
      2. improve vacuum for gist
         - use FSM
         - full vacuum:
            - reforms parent tuple if it's needed
              ( tuples was deleted on child page or parent tuple remains invalid
                after crash recovery )
            - truncate index file if possible
      3. fixes bugs and mistakes
      d544ec8b
  30. Jun 14, 2005
  31. May 17, 2005
    • Neil Conway's avatar
      Cleanup GiST header files. Since GiST extensions are often written as · c891e05f
      Neil Conway authored
      external projects, we should be careful about what parts of the GiST
      API are considered implementation details, and which are part of the
      public API. Therefore, I've moved internal-only declarations into
      gist_private.h -- future backward-incompatible changes to gist.h should
      be made with care, to avoid needlessly breaking external GiST extensions.
      
      Also did some related header cleanup: remove some unnecessary #includes
      from gist.h, and remove some unused definitions: isAttByVal(), _gistdump(),
      and GISTNStrategies.
      c891e05f
    • Neil Conway's avatar
      GiST improvements: · eda6dd32
      Neil Conway authored
      - make sure we always invoke user-supplied GiST methods in a short-lived
        memory context. This means the backend isn't exposed to any memory leaks
        that be in those methods (in fact, it is probably a net loss for most
        GiST methods to bother manually freeing memory now). This also means
        we can do away with a lot of ugly manual memory management in the
        GiST code itself.
      
      - keep the current page of a GiST index scan pinned, rather than doing a
        ReadBuffer() for each tuple produced by the scan. Since ReadBuffer() is
        expensive, this is a perf. win
      
      - implement dead tuple killing for GiST indexes (which is easy to do, now
        that we keep a pin on the current scan page). Now all the builtin indexes
        implement dead tuple killing.
      
      - cleanup a lot of ugly code in GiST
      eda6dd32
  32. Mar 28, 2005
    • Tom Lane's avatar
      First steps towards index scans with heap access decoupled from index · bf3dbb58
      Tom Lane authored
      access: define new index access method functions 'amgetmulti' that can
      fetch multiple TIDs per call.  (The functions exist but are totally
      untested as yet.)  Since I was modifying pg_am anyway, remove the
      no-longer-needed 'rel' parameter from amcostestimate functions, and
      also remove the vestigial amowner column that was creating useless
      work for Alvaro's shared-object-dependencies project.
      Initdb forced due to changes in pg_am.
      bf3dbb58
  33. Feb 05, 2005
  34. Dec 31, 2004
    • PostgreSQL Daemon's avatar
      · 2ff50159
      PostgreSQL Daemon authored
      Tag appropriate files for rc3
      
      Also performed an initial run through of upgrading our Copyright date to
      extend to 2005 ... first run here was very simple ... change everything
      where: grep 1996-2004 && the word 'Copyright' ... scanned through the
      generated list with 'less' first, and after, to make sure that I only
      picked up the right entries ...
      2ff50159
  35. Aug 29, 2004
  36. Jan 07, 2004
  37. Nov 29, 2003
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  38. Nov 12, 2003
    • Tom Lane's avatar
      Cross-data-type comparisons are now indexable by btrees, pursuant to my · fa5c8a05
      Tom Lane authored
      pghackers proposal of 8-Nov.  All the existing cross-type comparison
      operators (int2/int4/int8 and float4/float8) have appropriate support.
      The original proposal of storing the right-hand-side datatype as part of
      the primary key for pg_amop and pg_amproc got modified a bit in the event;
      it is easier to store zero as the 'default' case and only store a nonzero
      when the operator is actually cross-type.  Along the way, remove the
      long-since-defunct bigbox_ops operator class.
      fa5c8a05
Loading