1. 06 Apr, 2002 1 commit
  2. 26 Mar, 2002 1 commit
  3. 06 Mar, 2002 2 commits
    • 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
    • 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
  4. 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
  5. 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
  6. 25 Feb, 2002 1 commit
    • Bruce Momjian's avatar
      I've attached a simple patch which should improve the performance of · f5dff447
      Bruce Momjian authored
      hashname() and reduce the penalty incured when NAMEDATALEN is increased.
      I posted this to -hackers a couple days ago, and there haven't been any
      major complaints. It passes the regression tests. See -hackers for more
      discussion, as well as the suggestion from Tom Lane on which this patch
      is based.
      
      Unless anyone sees any problems, please apply for 7.3.
      
      Cheers,
      
      Neil Conway
      f5dff447
  7. 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
  8. 05 Nov, 2001 1 commit
  9. 28 Oct, 2001 1 commit
  10. 25 Oct, 2001 1 commit
  11. 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
  12. 21 Aug, 2001 1 commit
    • Tom Lane's avatar
      Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions in · f933766b
      Tom Lane authored
      pgsql-hackers.  pg_opclass now has a row for each opclass supported by each
      index AM, not a row for each opclass name.  This allows pg_opclass to show
      directly whether an AM supports an opclass, and furthermore makes it possible
      to store additional information about an opclass that might be AM-dependent.
      pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we
      previously expected the user to remember to provide in CREATE INDEX commands.
      Lossiness is no longer an index-level property, but is associated with the
      use of a particular operator in a particular index opclass.
      
      Along the way, IndexSupportInitialize now uses the syscaches to retrieve
      pg_amop and pg_amproc entries.  I find this reduces backend launch time by
      about ten percent, at the cost of a couple more special cases in catcache.c's
      IndexScanOK.
      
      Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane.
      
      initdb forced.
      f933766b
  13. 22 Jun, 2001 1 commit
  14. 19 Jun, 2001 1 commit
    • Tom Lane's avatar
      Clean up some longstanding problems in shared-cache invalidation. · bbbc00af
      Tom Lane authored
      SI messages now include the relevant database OID, so that operations
      in one database do not cause useless cache flushes in backends attached
      to other databases.  Declare SI messages properly using a union, to
      eliminate the former assumption that Oid is the same size as int or Index.
      Rewrite the nearly-unreadable code in inval.c, and document it better.
      Arrange for catcache flushes at end of command/transaction to happen before
      relcache flushes do --- this avoids loading a new tuple into the catcache
      while setting up new relcache entry, only to have it be flushed again
      immediately.
      bbbc00af
  15. 18 Jun, 2001 1 commit
    • Tom Lane's avatar
      Do some restructuring to improve performance of the catcaches. Teach · 2c5aa2ac
      Tom Lane authored
      CatalogCacheFlushRelation (formerly called SystemCacheRelationFlushed)
      how to distinguish tuples it should flush from those it needn't; this
      means a relcache flush event now only removes the catcache entries
      it ought to, rather than zapping the caches completely as it used to.
      Testing with the regression tests indicates that this considerably
      improves the lifespan of catcache entries.  Also, rearrange catcache
      data structures so that the limit on number of cached tuples applies
      globally across all the catcaches, rather than being per-catcache.
      It was a little silly to have the same size limit on both, say,
      pg_attribute caches and pg_am caches (there being only four possible
      rows in the latter...).  Doing LRU removal across all the caches
      instead of locally in each one should reduce cache reload traffic
      in the more heavily used caches and improve the efficiency of
      cache memory use.
      2c5aa2ac
  16. 01 Jun, 2001 1 commit
    • Tom Lane's avatar
      Clean up some minor problems exposed by further thought about Panon's bug · 0b370ea7
      Tom Lane authored
      report on old-style functions invoked by RI triggers.  We had a number of
      other places that were being sloppy about which memory context FmgrInfo
      subsidiary data will be allocated in.  Turns out none of them actually
      cause a problem in 7.1, but this is for arcane reasons such as the fact
      that old-style triggers aren't supported anyway.  To avoid getting burnt
      later, I've restructured the trigger support so that we don't keep trigger
      FmgrInfo structs in relcache memory.  Some other related cleanups too:
      it's not really necessary to call fmgr_info at all while setting up
      the index support info in relcache entries, because those ScanKeyEntry
      structs are never used to invoke the functions.  This should speed up
      relcache initialization a tiny bit.
      0b370ea7
  17. 22 Mar, 2001 1 commit
  18. 22 Feb, 2001 1 commit
  19. 24 Jan, 2001 1 commit
  20. 05 Jan, 2001 1 commit
  21. 24 Nov, 2000 1 commit
  22. 16 Nov, 2000 1 commit
  23. 10 Nov, 2000 1 commit
    • Tom Lane's avatar
      Clean up syscache so that recursive invocation is safe, and remove error · ddeab225
      Tom Lane authored
      message about recursive use of a syscache.  Also remove most of the
      specialized indexscan routines in indexing.c --- it turns out that
      catcache.c is perfectly able to perform the indexscan for itself,
      in fact has already looked up all the information needed to do so!
      This should be faster as well as needing far less boilerplate code.
      ddeab225
  24. 06 Aug, 2000 1 commit
  25. 02 Jul, 2000 1 commit
  26. 28 Jun, 2000 1 commit
    • Tom Lane's avatar
      First phase of memory management rewrite (see backend/utils/mmgr/README · 1aebc361
      Tom Lane authored
      for details).  It doesn't really do that much yet, since there are no
      short-term memory contexts in the executor, but the infrastructure is
      in place and long-term contexts are handled reasonably.  A few long-
      standing bugs have been fixed, such as 'VACUUM; anything' in a single
      query string crashing.  Also, out-of-memory is now considered a
      recoverable ERROR, not FATAL.
      Eliminate a large amount of crufty, now-dead code in and around
      memory management.
      Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and
      backend startup.
      1aebc361
  27. 19 Jun, 2000 1 commit
  28. 17 Jun, 2000 1 commit
  29. 05 Jun, 2000 1 commit
  30. 28 May, 2000 1 commit
    • Tom Lane's avatar
      First round of changes for new fmgr interface. fmgr itself and the · 0a7fb4e9
      Tom Lane authored
      key call sites are changed, but most called functions are still oldstyle.
      An exception is that the PL managers are updated (so, for example, NULL
      handling now behaves as expected in plperl and plpgsql functions).
      NOTE initdb is forced due to added column in pg_proc.
      0a7fb4e9
  31. 12 Apr, 2000 1 commit
  32. 21 Feb, 2000 1 commit
  33. 18 Feb, 2000 1 commit
  34. 04 Feb, 2000 1 commit
  35. 31 Jan, 2000 1 commit
    • Tom Lane's avatar
      Fix problems seen in parallel regress tests when SI buffer overruns (causing · a152ebee
      Tom Lane authored
      syscache and relcache flushes).  Relcache entry rebuild now preserves
      original tupledesc, rewrite rules, and triggers if possible, so that pointers
      to these things remain valid --- if these things change while relcache entry
      has positive refcount, we elog(ERROR) to avoid later crash.  Arrange for
      xact-local rels to be rebuilt when an SI inval message is seen for them,
      so that they are updated by CommandCounterIncrement the same as regular rels.
      (This is useful because of Hiroshi's recent changes to process our own SI
      messages at CommandCounterIncrement time.)  This allows simplification of
      some routines that previously hacked around the lack of an automatic update.
      catcache now keeps its own copy of tupledesc for its relation, rather than
      depending on the relcache's copy; this avoids needing to reinitialize catcache
      during a cache flush, which saves some cycles and eliminates nasty circularity
      problems that occur if a cache flush happens while trying to initialize a
      catcache.
      Eliminate a number of permanent memory leaks that used to happen during
      catcache or relcache flush; not least of which was that catcache never
      freed any cached tuples!  (Rule parsetree storage is still leaked, however;
      will fix that separately.)
      Nothing done yet about code that uses tuples retrieved by SearchSysCache
      for longer than is safe.
      a152ebee
  36. 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
  37. 17 Jan, 2000 1 commit
  38. 10 Jan, 2000 1 commit
  39. 16 Dec, 1999 1 commit