1. 06 Dec, 2005 1 commit
    • Tom Lane's avatar
      Get rid of slru.c's hardwired insistence on a fixed number of slots per · 887a7c61
      Tom Lane authored
      SLRU area.  The number of slots is still a compile-time constant (someday
      we might want to change that), but at least it's a different constant for
      each SLRU area.  Increase number of subtrans buffers to 32 based on
      experimentation with a heavily subtrans-bashing test case, and increase
      number of multixact member buffers to 16, since it's obviously silly for
      it not to be at least twice the number of multixact offset buffers.
      887a7c61
  2. 15 Oct, 2005 1 commit
  3. 12 Oct, 2005 1 commit
  4. 07 Oct, 2005 2 commits
  5. 16 Sep, 2005 1 commit
  6. 20 Aug, 2005 1 commit
    • Tom Lane's avatar
      Convert the arithmetic for shared memory size calculation from 'int' · 0007490e
      Tom Lane authored
      to 'Size' (that is, size_t), and install overflow detection checks in it.
      This allows us to remove the former arbitrary restrictions on NBuffers
      etc.  It won't make any difference in a 32-bit machine, but in a 64-bit
      machine you could theoretically have terabytes of shared buffers.
      (How efficiently we could manage 'em remains to be seen.)  Similarly,
      num_temp_buffers, work_mem, and maintenance_work_mem can be set above
      2Gb on a 64-bit machine.  Original patch from Koichi Suzuki, additional
      work by moi.
      0007490e
  7. 28 Apr, 2005 1 commit
    • Tom Lane's avatar
      Implement sharable row-level locks, and use them for foreign key references · bedb78d3
      Tom Lane authored
      to eliminate unnecessary deadlocks.  This commit adds SELECT ... FOR SHARE
      paralleling SELECT ... FOR UPDATE.  The implementation uses a new SLRU
      data structure (managed much like pg_subtrans) to represent multiple-
      transaction-ID sets.  When more than one transaction is holding a shared
      lock on a particular row, we create a MultiXactId representing that set
      of transactions and store its ID in the row's XMAX.  This scheme allows
      an effectively unlimited number of row locks, just as we did before,
      while not costing any extra overhead except when a shared lock actually
      has to be shared.   Still TODO: use the regular lock manager to control
      the grant order when multiple backends are waiting for a row lock.
      
      Alvaro Herrera and Tom Lane.
      bedb78d3
  8. 08 Apr, 2005 2 commits
  9. 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
  10. 29 Aug, 2004 2 commits
  11. 23 Aug, 2004 1 commit
    • Tom Lane's avatar
      Rearrange pg_subtrans handling as per recent discussion. pg_subtrans · 4dbb880d
      Tom Lane authored
      updates are no longer WAL-logged nor even fsync'd; we do not need to,
      since after a crash no old pg_subtrans data is needed again.  We truncate
      pg_subtrans to RecentGlobalXmin at each checkpoint.  slru.c's API is
      refactored a little bit to separate out the necessary decisions.
      4dbb880d
  12. 01 Jul, 2004 1 commit
  13. 11 Jun, 2004 1 commit
    • Tom Lane's avatar
      Add some code to Assert that when we release pin on a buffer, we are · e6cba715
      Tom Lane authored
      not holding the buffer's cntx_lock or io_in_progress_lock.  A recent
      report from Litao Wu makes me wonder whether it is ever possible for
      us to drop a buffer and forget to release its cntx_lock.  The Assert
      does not fire in the regression tests, but that proves little ...
      e6cba715
  14. 20 Dec, 2003 1 commit
  15. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  16. 04 Aug, 2003 1 commit
  17. 24 Jul, 2003 1 commit
  18. 11 Jun, 2003 1 commit
    • Bruce Momjian's avatar
      This patch extracts page buffer pooling and the simple · 0abe7431
      Bruce Momjian authored
      least-recently-used strategy from clog.c into slru.c.  It doesn't
      change any visible behaviour and passes all regression tests plus a
      TruncateCLOG test done manually.
      
      Apart from refactoring I made a little change to SlruRecentlyUsed,
      formerly ClogRecentlyUsed:  It now skips incrementing lru_counts, if
      slotno is already the LRU slot, thus saving a few CPU cycles.  To make
      this work, lru_counts are initialised to 1 in SimpleLruInit.
      
      SimpleLru will be used by pg_subtrans (part of the nested transactions
      project), so the main purpose of this patch is to avoid future code
      duplication.
      
      Manfred Koizar
      0abe7431
  19. 25 Sep, 2002 1 commit
    • Tom Lane's avatar
      Remove ShutdownBufferPoolAccess exit callback, and do the work in · 8a6fab41
      Tom Lane authored
      ProcKill instead, where we still have a PGPROC with which to wait on
      LWLocks.  This fixes 'can't wait without a PROC structure' failures
      occasionally seen during backend shutdown (I'm surprised they weren't
      more frequent, actually).  Add an Assert() to LWLockAcquire to help
      catch any similar mistakes in future.  Fix failure to update MyProcPid
      for standalone backends and pgstat processes.
      8a6fab41
  20. 04 Sep, 2002 1 commit
  21. 20 Jun, 2002 1 commit
  22. 11 Jun, 2002 1 commit
    • Jan Wieck's avatar
      Katherine Ward wrote: · 469cb65a
      Jan Wieck authored
      > Changes to avoid collisions with WIN32 & MFC names...
      > 1.  Renamed:
      >       a.  PROC => PGPROC
      >       b.  GetUserName() => GetUserNameFromId()
      >       c.  GetCurrentTime() => GetCurrentDateTime()
      >       d.  IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim
      >
      > 2.  Added _P to some lex/yacc tokens:
      >       CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT
      
      Jan
      469cb65a
  23. 05 May, 2002 1 commit
  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. 07 Jan, 2002 1 commit
    • Tom Lane's avatar
      Tweak LWLock algorithms so that an awakened waiter for a lock is not · 5b9a0583
      Tom Lane authored
      granted the lock when awakened; the signal now only means that the lock
      is potentially available.  The waiting process must retry its attempt
      to get the lock when it gets to run.  This allows the lock releasing
      process to re-acquire the lock later in its timeslice.  Since LWLocks
      are usually held for short periods, it is possible for a process to
      acquire and release the same lock many times in a timeslice.  The old
      spinlock-based implementation of these locks allowed for that; but the
      original coding of LWLock would force a process swap for each acquisition
      if there was any contention.  Although this approach reopens the door to
      process starvation (a waiter might repeatedly fail to get the lock),
      the odds of that being a big problem seem low, and the performance cost
      of the previous approach is considerable.
      5b9a0583
  26. 29 Dec, 2001 2 commits
  27. 28 Dec, 2001 1 commit
  28. 10 Dec, 2001 1 commit
  29. 05 Nov, 2001 1 commit
  30. 25 Oct, 2001 1 commit
  31. 29 Sep, 2001 1 commit
    • Tom Lane's avatar
      Implement new 'lightweight lock manager' that's intermediate between · 499abb0c
      Tom Lane authored
      existing lock manager and spinlocks: it understands exclusive vs shared
      lock but has few other fancy features.  Replace most uses of spinlocks
      with lightweight locks.  All remaining uses of spinlocks have very short
      lock hold times (a few dozen instructions), so tweak spinlock backoff
      code to work efficiently given this assumption.  All per my proposal on
      pghackers 26-Sep-01.
      499abb0c