1. 11 May, 2005 1 commit
  2. 27 Mar, 2005 1 commit
    • 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
  3. 21 Mar, 2005 1 commit
    • Tom Lane's avatar
      Convert index-related tuple handling routines from char 'n'/' ' to bool · ee4ddac1
      Tom Lane authored
      convention for isnull flags.  Also, remove the useless InsertIndexResult
      return struct from index AM aminsert calls --- there is no reason for
      the caller to know where in the index the tuple was inserted, and we
      were wasting a palloc cycle per insert to deliver this uninteresting
      value (plus nontrivial complexity in some AMs).
      I forced initdb because of the change in the signature of the aminsert
      routines, even though nothing really looks at those pg_proc entries...
      ee4ddac1
  4. 31 Dec, 2004 1 commit
    • 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
  5. 17 Nov, 2004 1 commit
  6. 11 Nov, 2004 1 commit
  7. 29 Aug, 2004 2 commits
  8. 10 Feb, 2004 1 commit
    • Tom Lane's avatar
      Centralize implementation of delay code by creating a pg_usleep() · 58f337a3
      Tom Lane authored
      subroutine in src/port/pgsleep.c.  Remove platform dependencies from
      miscadmin.h and put them in port.h where they belong.  Extend recent
      vacuum cost-based-delay patch to apply to VACUUM FULL, ANALYZE, and
      non-btree index vacuuming.
      
      By the way, where is the documentation for the cost-based-delay patch?
      58f337a3
  9. 07 Jan, 2004 1 commit
  10. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  11. 04 Sep, 2003 1 commit
    • Tom Lane's avatar
      Reimplement hash index locking algorithms, per my recent proposal to · 7a369371
      Tom Lane authored
      pghackers.  This fixes the problem recently reported by Markus KrÌutner
      (hash bucket split corrupts the state of scans being done concurrently),
      and I believe it also fixes all the known problems with deadlocks in
      hash index operations.  Hash indexes are still not really ready for prime
      time (since they aren't WAL-logged), but this is a step forward.
      7a369371
  12. 02 Sep, 2003 2 commits
    • Tom Lane's avatar
      Several fixes for hash indexes that involve changing the on-disk index · d70610c4
      Tom Lane authored
      layout; therefore, this change forces REINDEX of hash indexes (though
      not a full initdb).  Widen hashm_ntuples to double so that hash space
      management doesn't get confused by more than 4G entries; enlarge the
      allowed number of free-space-bitmap pages; replace the useless bshift
      field with a useful bmshift field; eliminate 4 bytes of wasted space
      in the per-page special area.
      d70610c4
    • Tom Lane's avatar
      Rewrite hashbulkdelete() to make it amenable to new bucket locking · 39673ca4
      Tom Lane authored
      scheme.  A pleasant side effect is that it is *much* faster when deleting
      a large fraction of the indexed tuples, because of elimination of
      redundant hash_step activity induced by hash_adjscans.  Various other
      continuing code cleanup.
      39673ca4
  13. 04 Aug, 2003 1 commit
  14. 21 Jul, 2003 1 commit
  15. 23 Mar, 2003 1 commit
  16. 24 Feb, 2003 1 commit
  17. 22 Feb, 2003 1 commit
    • Tom Lane's avatar
      More infrastructure for btree compaction project. Tree-traversal code · 799bc58d
      Tom Lane authored
      now knows what to do upon hitting a dead page (in theory anyway, it's
      untested...).  Add a post-VACUUM-cleanup entry point for index AMs, to
      provide a place for dead-page scavenging to happen.
      Also, fix oversight that broke btpo_prev links in temporary indexes.
      initdb forced due to additions in pg_am.
      799bc58d
  18. 04 Sep, 2002 1 commit
  19. 20 Jun, 2002 1 commit
  20. 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
  21. 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
  22. 09 Mar, 2002 1 commit
  23. 06 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      I've attached a patch which implements Bob Jenkin's hash function for · 7ab74673
      Bruce Momjian authored
      PostgreSQL. This hash function replaces the one used by hash indexes and
      the catalog cache. Hash joins use a different, relatively poor-quality
      hash function, but I'll fix that later.
      
      As suggested by Tom Lane, this patch also changes the size of the fixed
      hash table used by the catalog cache to be a power-of-2 (instead of a
      prime: I chose 256 instead of 257). This allows the catcache to lookup
      hash buckets using a simple bitmask. This should improve the performance
      of the catalog cache slightly, since the previous method (modulo a
      prime) was slow.
      
      In my tests, this improves the performance of hash indexes by between 4%
      and 8%; the performance when using btree indexes or seqscans is
      basically unchanged.
      
      Neil Conway <neilconway@rogers.com>
      7ab74673
  24. 02 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      Commit to match discussed elog() changes. Only update is that LOG is · a033daf5
      Bruce Momjian authored
      now just below FATAL in server_min_messages.  Added more text to
      highlight ordering difference between it and client_min_messages.
      
      ---------------------------------------------------------------------------
      
      REALLYFATAL => PANIC
      STOP => PANIC
      New INFO level the prints to client by default
      New LOG level the prints to server log by default
      Cause VACUUM information to print only to the client
      NOTICE => INFO where purely information messages are sent
      DEBUG => LOG for purely server status messages
      DEBUG removed, kept as backward compatible
      DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
      DebugLvl removed in favor of new DEBUG[1-5] symbols
      New server_min_messages GUC parameter with values:
              DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
      New client_min_messages GUC parameter with values:
              DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
      Server startup now logged with LOG instead of DEBUG
      Remove debug_level GUC parameter
      elog() numbers now start at 10
      Add test to print error message if older elog() values are passed to elog()
      Bootstrap mode now has a -d that requires an argument, like postmaster
      a033daf5
  25. 25 Oct, 2001 1 commit
  26. 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
  27. 07 May, 2001 1 commit
    • Tom Lane's avatar
      Rewrite of planner statistics-gathering code. ANALYZE is now available as · f905d65e
      Tom Lane authored
      a separate statement (though it can still be invoked as part of VACUUM, too).
      pg_statistic redesigned to be more flexible about what statistics are
      stored.  ANALYZE now collects a list of several of the most common values,
      not just one, plus a histogram (not just the min and max values).  Random
      sampling is used to make the process reasonably fast even on very large
      tables.  The number of values and histogram bins collected is now
      user-settable via an ALTER TABLE command.
      
      There is more still to do; the new stats are not being used everywhere
      they could be in the planner.  But the remaining changes for this project
      should be localized, and the behavior is already better than before.
      
      A not-very-related change is that sorting now makes use of btree comparison
      routines if it can find one, rather than invoking '<' twice.
      f905d65e
  28. 22 Mar, 2001 1 commit
  29. 22 Feb, 2001 1 commit
  30. 29 Jan, 2001 1 commit
    • Tom Lane's avatar
      Clean up handling of tuple descriptors so that result-tuple descriptors · 0d54d6ac
      Tom Lane authored
      allocated by plan nodes are not leaked at end of query.  This doesn't
      really matter for normal queries, but it sure does for queries invoked
      repetitively inside SQL functions.  Clean up some other grotty code
      associated with tupdescs, and fix a few other memory leaks exposed by
      tests with simple SQL functions.
      0d54d6ac
  31. 24 Jan, 2001 1 commit
  32. 30 Nov, 2000 1 commit
  33. 21 Nov, 2000 1 commit
  34. 08 Nov, 2000 1 commit
    • Tom Lane's avatar
      Make DROP TABLE rollback-able: postpone physical file delete until commit. · 3908473c
      Tom Lane authored
      (WAL logging for this is not done yet, however.)  Clean up a number of really
      crufty things that are no longer needed now that DROP behaves nicely.  Make
      temp table mapper do the right things when drop or rename affecting a temp
      table is rolled back.  Also, remove "relation modified while in use" error
      check, in favor of locking tables at first reference and holding that lock
      throughout the statement.
      3908473c
  35. 21 Oct, 2000 1 commit
  36. 14 Jul, 2000 1 commit
    • Tom Lane's avatar
      Cleanup of code for creating index entries. Functional indexes with · 6bfe6403
      Tom Lane authored
      pass-by-ref data types --- eg, an index on lower(textfield) --- no longer
      leak memory during index creation or update.  Clean up a lot of redundant
      code ... did you know that copy, vacuum, truncate, reindex, extend index,
      and bootstrap each basically duplicated the main executor's logic for
      extracting information about an index and preparing index entries?
      Functional indexes should be a little faster now too, due to removal
      of repeated function lookups.
      CREATE INDEX 'opt_type' clause is deimplemented by these changes,
      but I haven't removed it from the parser yet (need to merge with
      Thomas' latest change set first).
      6bfe6403
  37. 12 Jul, 2000 1 commit
  38. 17 Jun, 2000 1 commit
    • Tom Lane's avatar
      Get rid of IndexIsUniqueNoCache() kluge by the simple expedient of · edf0b5f0
      Tom Lane authored
      passing the index-is-unique flag to index build routines (duh! ...
      why wasn't it done this way to begin with?).  Aside from eliminating
      an eyesore, this should save a few milliseconds in btree index creation
      because a full scan of pg_index is not needed any more.
      edf0b5f0