1. 24 May, 2002 1 commit
    • Tom Lane's avatar
      Mark index entries "killed" when they are no longer visible to any · 3f4d4880
      Tom Lane authored
      transaction, so as to avoid returning them out of the index AM.  Saves
      repeated heap_fetch operations on frequently-updated rows.  Also detect
      queries on unique keys (equality to all columns of a unique index), and
      don't bother continuing scan once we have found first match.
      
      Killing is implemented in the btree and hash AMs, but not yet in rtree
      or gist, because there isn't an equally convenient place to do it in
      those AMs (the outer amgetnext routine can't do it without re-pinning
      the index page).
      
      Did some small cleanup on APIs of HeapTupleSatisfies, heap_fetch, and
      index_insert to make this a little easier.
      3f4d4880
  2. 20 May, 2002 1 commit
    • Tom Lane's avatar
      Restructure indexscan API (index_beginscan, index_getnext) per · 44fbe20d
      Tom Lane authored
      yesterday's proposal to pghackers.  Also remove unnecessary parameters
      to heap_beginscan, heap_rescan.  I modified pg_proc.h to reflect the
      new numbers of parameters for the AM interface routines, but did not
      force an initdb because nothing actually looks at those fields.
      44fbe20d
  3. 25 Oct, 2001 1 commit
  4. 06 Oct, 2001 1 commit
    • Tom Lane's avatar
      Rearrange fmgr.c and relcache so that it's possible to keep FmgrInfo · 85801a4d
      Tom Lane authored
      lookup info in the relcache for index access method support functions.
      This makes a huge difference for dynamically loaded support functions,
      and should save a few cycles even for built-in ones.  Also tweak dfmgr.c
      so that load_external_function is called only once, not twice, when
      doing fmgr_info for a dynamically loaded function.  All per performance
      gripe from Teodor Sigaev, 5-Oct-01.
      85801a4d
  5. 15 Jul, 2001 1 commit
    • Tom Lane's avatar
      Restructure index AM interface for index building and index tuple deletion, · c8076f09
      Tom Lane authored
      per previous discussion on pghackers.  Most of the duplicate code in
      different AMs' ambuild routines has been moved out to a common routine
      in index.c; this means that all index types now do the right things about
      inserting recently-dead tuples, etc.  (I also removed support for EXTEND
      INDEX in the ambuild routines, since that's about to go away anyway, and
      it cluttered the code a lot.)  The retail indextuple deletion routines have
      been replaced by a "bulk delete" routine in which the indexscan is inside
      the access method.  I haven't pushed this change as far as it should go yet,
      but it should allow considerable simplification of the internal bookkeeping
      for deletions.  Also, add flag columns to pg_am to eliminate various
      hardcoded tests on AM OIDs, and remove unused pg_am columns.
      
      Fix rtree and gist index types to not attempt to store NULLs; before this,
      gist usually crashed, while rtree managed not to crash but computed wacko
      bounding boxes for NULL entries (which might have had something to do with
      the performance problems we've heard about occasionally).
      
      Add AtEOXact routines to hash, rtree, and gist, all of which have static
      state that needs to be reset after an error.  We discovered this need long
      ago for btree, but missed the other guys.
      
      Oh, one more thing: concurrent VACUUM is now the default.
      c8076f09
  6. 23 Mar, 2001 1 commit
  7. 22 Mar, 2001 2 commits
  8. 24 Jan, 2001 1 commit
  9. 25 Jul, 2000 1 commit
  10. 21 Jul, 2000 1 commit
    • Tom Lane's avatar
      Major overhaul of btree index code. Eliminate special BTP_CHAIN logic for · 9e85183b
      Tom Lane authored
      duplicate keys by letting search go to the left rather than right when an
      equal key is seen at an upper tree level.  Fix poor choice of page split
      point (leading to insertion failures) that was forced by chaining logic.
      Don't store leftmost key in non-leaf pages, since it's not necessary.
      Don't create root page until something is first stored in the index, so an
      unused index is now 8K not 16K.  (Doesn't seem to be as easy to get rid of
      the metadata page, unfortunately.)  Massive cleanup of unreadable code,
      fix poor, obsolete, and just plain wrong documentation and comments.
      See src/backend/access/nbtree/README for the gory details.
      9e85183b
  11. 30 May, 2000 1 commit
  12. 12 Apr, 2000 1 commit
  13. 17 Mar, 2000 1 commit
  14. 18 Feb, 2000 1 commit
    • Tom Lane's avatar
      Replace inefficient _bt_invokestrat calls with direct calls to the · 8cb62426
      Tom Lane authored
      appropriate btree three-way comparison routine.  Not clear why the
      three-way comparison routines were being used in some paths and not
      others in btree --- incomplete changes by someone long ago, maybe?
      Anyway, this makes for a nice speedup in CREATE INDEX.
      8cb62426
  15. 26 Jan, 2000 1 commit
    • Bruce Momjian's avatar
      Add: · 5c25d602
      Bruce Momjian authored
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  16. 07 Nov, 1999 1 commit
  17. 27 Sep, 1999 1 commit
  18. 17 Jul, 1999 2 commits
  19. 16 Jul, 1999 2 commits
  20. 15 Jul, 1999 3 commits
  21. 14 Jul, 1999 1 commit
  22. 25 May, 1999 2 commits
  23. 13 Apr, 1999 1 commit
    • Bruce Momjian's avatar
      There are some bugs about backward scanning using · 174b552e
      Bruce Momjian authored
      indexes.
      
      1. Index Scan using plural indexids never scan backward
         as to the order of indexids.
      2. The cursor using Index scan is not usable after moving
         past the end.
      
      This patch solves above bugs.
      Moreover the change of _bt_first() would be useful to extend
      ORDER BY patch by Jan Wieck for all descending order cases.
      
      Hiroshi Inoue
      174b552e
  24. 28 Mar, 1999 1 commit
    • Vadim B. Mikheev's avatar
      1. Vacuum is updated for MVCC. · fdf6be80
      Vadim B. Mikheev authored
      2. Much faster btree tuples deletion in the case when first on page
         index tuple is deleted (no movement to the left page(s)).
      3. Remember blkno of new root page in BTPageOpaque of
         left/right siblings when root page is splitted.
      fdf6be80
  25. 21 Feb, 1999 1 commit
    • Marc G. Fournier's avatar
      · 8c3e8a8a
      Marc G. Fournier authored
      From: Tatsuo Ishii <t-ishii@sra.co.jp>
      
      Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
      NOT_USED" for current. I have tested these patches in that the
      postgres binaries are identical.
      8c3e8a8a
  26. 13 Feb, 1999 1 commit
  27. 02 Nov, 1998 1 commit
  28. 01 Sep, 1998 2 commits
  29. 15 Jun, 1998 1 commit
  30. 13 May, 1998 1 commit
  31. 10 Apr, 1998 3 commits