1. 03 Mar, 2002 1 commit
    • Tom Lane's avatar
      Catcaches can now store negative entries as well as positive ones, to · 26ac2171
      Tom Lane authored
      speed up repetitive failed searches; per pghackers discussion in late
      January.  inval.c logic substantially simplified, since we can now treat
      inserts and deletes alike as far as inval events are concerned.  Some
      repair work needed in heap_create_with_catalog, which turns out to have
      been doing CommandCounterIncrement at a point where the new relation has
      non-self-consistent catalog entries.  With the new inval code, that
      resulted in assert failures during a relcache entry rebuild.
      26ac2171
  2. 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
  3. 19 Feb, 2002 1 commit
    • Tom Lane's avatar
      A bunch of changes aimed at reducing backend startup time... · 78634044
      Tom Lane authored
      Improve 'pg_internal.init' relcache entry preload mechanism so that it is
      safe to use for all system catalogs, and arrange to preload a realistic
      set of system-catalog entries instead of only the three nailed-in-cache
      indexes that were formerly loaded this way.  Fix mechanism for deleting
      out-of-date pg_internal.init files: this must be synchronized with transaction
      commit, not just done at random times within transactions.  Drive it off
      relcache invalidation mechanism so that no special-case tests are needed.
      
      Cache additional information in relcache entries for indexes (their pg_index
      tuples and index-operator OIDs) to eliminate repeated lookups.  Also cache
      index opclass info at the per-opclass level to avoid repeated lookups during
      relcache load.
      
      Generalize 'systable scan' utilities originally developed by Hiroshi,
      move them into genam.c, use in a number of places where there was formerly
      ugly code for choosing either heap or index scan.  In particular this allows
      simplification of the logic that prevents infinite recursion between syscache
      and relcache during startup: we can easily switch to heapscans in relcache.c
      when and where needed to avoid recursion, so IndexScanOK becomes simpler and
      does not need any expensive initialization.
      
      Eliminate useless opening of a heapscan data structure while doing an indexscan
      (this saves an mdnblocks call and thus at least one kernel call).
      78634044
  4. 06 Jan, 2002 1 commit
  5. 05 Nov, 2001 1 commit
  6. 28 Oct, 2001 1 commit
  7. 25 Oct, 2001 1 commit
  8. 04 Sep, 2001 1 commit
  9. 26 Aug, 2001 1 commit
  10. 10 Aug, 2001 1 commit
    • Tom Lane's avatar
      Make OIDs optional, per discussions in pghackers. WITH OIDS is still the · bf56f075
      Tom Lane authored
      default, but OIDS are removed from many system catalogs that don't need them.
      Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
      pg_description has a three-column key instead of one.
      
      Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
      has some usefulness; pg_dump dumps comments on indexes, rules, and
      triggers in a valid order.
      
      initdb forced.
      bf56f075
  11. 18 Jul, 2001 1 commit
  12. 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
  13. 13 Jul, 2001 1 commit
  14. 12 Jul, 2001 1 commit
  15. 11 Jul, 2001 1 commit
  16. 02 Jul, 2001 1 commit
  17. 29 Jun, 2001 2 commits
  18. 27 Jun, 2001 1 commit
    • Tom Lane's avatar
      Install infrastructure for shared-memory free space map. Doesn't actually · e0c9301c
      Tom Lane authored
      do anything yet, but it has the necessary connections to initialization
      and so forth.  Make some gestures towards allowing number of blocks in
      a relation to be BlockNumber, ie, unsigned int, rather than signed int.
      (I doubt I got all the places that are sloppy about it, yet.)  On the
      way, replace the hardwired NLOCKS_PER_XACT fudge factor with a GUC
      variable.
      e0c9301c
  19. 22 Jun, 2001 1 commit
  20. 13 Jun, 2001 1 commit
    • Tom Lane's avatar
      Allow a non-superuser database owner to vacuum all tables in his · 1a6bb6d8
      Tom Lane authored
      database, including system catalogs (but not the shared catalogs,
      since they don't really belong to his database).  This is per recent
      mailing list discussion.  Clean up some other code that also checks
      for database ownerness by introducing a test function is_dbadmin().
      1a6bb6d8
  21. 25 May, 2001 2 commits
  22. 18 May, 2001 1 commit
  23. 17 May, 2001 2 commits
  24. 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
  25. 25 Mar, 2001 1 commit
  26. 22 Mar, 2001 1 commit
  27. 14 Mar, 2001 1 commit
  28. 24 Jan, 2001 1 commit
  29. 23 Jan, 2001 1 commit
  30. 19 Jan, 2001 1 commit
  31. 14 Jan, 2001 1 commit
  32. 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
  33. 30 Dec, 2000 1 commit
  34. 28 Dec, 2000 1 commit
  35. 22 Dec, 2000 2 commits
    • Tom Lane's avatar
      Small cleanup of temp-table handling. Disallow creation of a non-temp · 90f42847
      Tom Lane authored
      table that inherits from a temp table.  Make sure the right things happen
      if one creates a temp table, creates another temp that inherits from it,
      then renames the first one.  (Previously, system would end up trying to
      delete the temp tables in the wrong order.)
      90f42847
    • Tom Lane's avatar
      Revise lock manager to support "session level" locks as well as "transaction · 6cc842ab
      Tom Lane authored
      level" locks.  A session lock is not released at transaction commit (but it
      is released on transaction abort, to ensure recovery after an elog(ERROR)).
      In VACUUM, use a session lock to protect the master table while vacuuming a
      TOAST table, so that the TOAST table can be done in an independent
      transaction.
      
      I also took this opportunity to do some cleanup and renaming in the lock
      code.  The previously noted bug in ProcLockWakeup, that it couldn't wake up
      any waiters beyond the first non-wakeable waiter, is now fixed.  Also found
      a previously unknown bug of the same kind (failure to scan all members of
      a lock queue in some cases) in DeadLockCheck.  This might have led to failure
      to detect a deadlock condition, resulting in indefinite waits, but it's
      difficult to characterize the conditions required to trigger a failure.
      6cc842ab
  36. 08 Dec, 2000 1 commit