1. 06 Aug, 2002 1 commit
    • Tom Lane's avatar
      Restructure local-buffer handling per recent pghackers discussion. · 5df307c7
      Tom Lane authored
      The local buffer manager is no longer used for newly-created relations
      (unless they are TEMP); a new non-TEMP relation goes through the shared
      bufmgr and thus will participate normally in checkpoints.  But TEMP relations
      use the local buffer manager throughout their lifespan.  Also, operations
      in TEMP relations are not logged in WAL, thus improving performance.
      Since it's no longer necessary to fsync relations as they move out of the
      local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code
      is no longer needed and has been removed: there's no concept of a dirty
      relation anymore in md.c/fd.c, and we never fsync anything but WAL.
      Still TODO: improve local buffer management algorithms so that it would
      be reasonable to increase NLocBuffer.
      5df307c7
  2. 02 Jul, 2002 1 commit
  3. 20 Jun, 2002 1 commit
  4. 24 May, 2002 2 commits
    • Tom Lane's avatar
    • 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
  5. 06 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      Change made to elog: · 92288a1c
      Bruce Momjian authored
      o  Change all current CVS messages of NOTICE to WARNING.  We were going
      to do this just before 7.3 beta but it has to be done now, as you will
      see below.
      
      o Change current INFO messages that should be controlled by
      client_min_messages to NOTICE.
      
      o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
      to always go to the client.
      
      o Remove INFO from the client_min_messages options and add NOTICE.
      
      Seems we do need three non-ERROR elog levels to handle the various
      behaviors we need for these messages.
      
      Regression passed.
      92288a1c
  6. 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
  7. 01 Jan, 2002 1 commit
  8. 25 Oct, 2001 1 commit
  9. 29 Sep, 2001 1 commit
    • Tom Lane's avatar
      Tweak btree page split logic so that when splitting a page that is · 1663f338
      Tom Lane authored
      rightmost on its tree level, we split 2/3 to the left and 1/3 to the
      new right page, rather than the even split we use elsewhere.  The idea
      is that when faced with a steadily increasing series of inserted keys
      (such as sequence or timestamp values), we'll end up with a btree that's
      about 2/3ds full not 1/2 full, which is much closer to the desired
      steady-state load for a btree.  Per suggestion from Ann Harrison of
      IBPhoenix.
      1663f338
  10. 23 Aug, 2001 1 commit
  11. 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
  12. 22 Jun, 2001 1 commit
  13. 22 Mar, 2001 1 commit
  14. 07 Feb, 2001 1 commit
  15. 02 Feb, 2001 1 commit
  16. 31 Jan, 2001 1 commit
  17. 29 Jan, 2001 1 commit
  18. 26 Jan, 2001 1 commit
  19. 24 Jan, 2001 1 commit
  20. 23 Jan, 2001 1 commit
  21. 14 Jan, 2001 1 commit
  22. 12 Jan, 2001 1 commit
    • Tom Lane's avatar
      Add more critical-section calls: all code sections that hold spinlocks · 6162432d
      Tom Lane authored
      are now critical sections, so as to ensure die() won't interrupt us while
      we are munging shared-memory data structures.  Avoid insecure intermediate
      states in some code that proc_exit will call, like palloc/pfree.  Rename
      START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be
      what people tend to call them anyway, and make them be called with () like
      a function call, in hopes of not confusing pg_indent.
      I doubt that this is sufficient to make SIGTERM safe anywhere; there's
      just too much code that could get invoked during proc_exit().
      6162432d
  23. 29 Dec, 2000 1 commit
  24. 28 Dec, 2000 1 commit
  25. 03 Dec, 2000 1 commit
  26. 30 Nov, 2000 1 commit
  27. 16 Nov, 2000 1 commit
    • Bruce Momjian's avatar
      Make pgsql compile on FreeBSD-alpha. · 312063c9
      Bruce Momjian authored
      Context diff this time.
      
      Remove -m486 compile args for FreeBSD-i386, compile -O2 on i386.
      
      Compile with only -O on alpha for codegen safety.
      
      Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD.
      
      Fix a lot of bogus string formats for outputting pointers (cast to int
      and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now
      cast to 'unsigned long' and output with %lu/
      
      Remove an unused variable.
      
      Alfred Perlstein
      312063c9
  28. 21 Oct, 2000 1 commit
  29. 13 Oct, 2000 2 commits
  30. 05 Oct, 2000 1 commit
  31. 04 Oct, 2000 1 commit
  32. 25 Aug, 2000 1 commit
  33. 21 Jul, 2000 2 commits
    • Tom Lane's avatar
      Fix sloppiness about alignment requirements in findsplitloc() space · 1ea912e1
      Tom Lane authored
      calculation, also make it stop when it has a 'good enough' split instead
      of exhaustively trying all split points.
      1ea912e1
    • 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
  34. 08 Jun, 2000 1 commit
  35. 30 May, 2000 1 commit
  36. 12 Apr, 2000 1 commit
  37. 17 Mar, 2000 1 commit