1. 09 3月, 2016 1 次提交
    • H
      Refactor away duplicated code in ReadBuffer_Resync() · fc929b37
      Heikki Linnakangas 提交于
      ReadBuffer_Resync() and BufferAlloc_Resync() were not materially different
      from plain ReadBuffer() and BufferAlloc(), so just use the latter directly.
      
      In the passing, also:
      * rename BufferAlloc_Internal to BufferAlloc_common, like it's called in
        newer upstream versions.
      * revert some spurious whitespace and comment differences vs. upstream.
      fc929b37
  2. 28 10月, 2015 1 次提交
  3. 06 1月, 2007 1 次提交
  4. 20 10月, 2006 1 次提交
  5. 23 7月, 2006 1 次提交
  6. 01 4月, 2006 1 次提交
    • T
      Clean up WAL/buffer interactions as per my recent proposal. Get rid of the · a8b8f4db
      Tom Lane 提交于
      misleadingly-named WriteBuffer routine, and instead require routines that
      change buffer pages to call MarkBufferDirty (which does exactly what it says).
      We also require that they do so before calling XLogInsert; this takes care of
      the synchronization requirement documented in SyncOneBuffer.  Note that
      because bufmgr takes the buffer content lock (in shared mode) while writing
      out any buffer, it doesn't matter whether MarkBufferDirty is executed before
      the buffer content change is complete, so long as the content change is
      completed before releasing exclusive lock on the buffer.  So it's OK to set
      the dirtybit before we fill in the LSN.
      This eliminates the former kluge of needing to set the dirtybit in LockBuffer.
      Aside from making the code more transparent, we can also add some new
      debugging assertions, in particular that the caller of MarkBufferDirty must
      hold the buffer content lock, not merely a pin.
      a8b8f4db
  7. 05 3月, 2006 1 次提交
  8. 30 12月, 2005 1 次提交
    • T
      Get rid of the SpinLockAcquire/SpinLockAcquire_NoHoldoff distinction · 195f1642
      Tom Lane 提交于
      in favor of having just one set of macros that don't do HOLD/RESUME_INTERRUPTS
      (hence, these correspond to the old SpinLockAcquire_NoHoldoff case).
      Given our coding rules for spinlock use, there is no reason to allow
      CHECK_FOR_INTERRUPTS to be done while holding a spinlock, and also there
      is no situation where ImmediateInterruptOK will be true while holding a
      spinlock.  Therefore doing HOLD/RESUME_INTERRUPTS while taking/releasing a
      spinlock is just a waste of cycles.  Qingqing Zhou and Tom Lane.
      195f1642
  9. 23 11月, 2005 1 次提交
  10. 18 11月, 2005 1 次提交
    • T
      DropRelFileNodeBuffers failed to fix the state of the lookup hash table · c859308a
      Tom Lane 提交于
      that was added to localbuf.c in 8.1; therefore, applying it to a temp table
      left corrupt lookup state in memory.  The only case where this had a
      significant chance of causing problems was an ON COMMIT DELETE ROWS temp
      table; the other possible paths left bogus state that was unlikely to
      be used again.  Per report from Csaba Nagy.
      c859308a
  11. 15 10月, 2005 1 次提交
  12. 13 10月, 2005 1 次提交
    • T
      Do all accesses to shared buffer headers through volatile-qualified · 07eeb9d1
      Tom Lane 提交于
      pointers, to ensure that compilers won't rearrange accesses to occur
      while we're not holding the buffer header spinlock.  It's probably
      not necessary to mark volatile in every single place in bufmgr.c,
      but better safe than sorry.  Per trouble report from Kevin Grittner.
      07eeb9d1
  13. 21 8月, 2005 1 次提交
    • T
      Convert the arithmetic for shared memory size calculation from 'int' · 0007490e
      Tom Lane 提交于
      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
  14. 20 5月, 2005 1 次提交
  15. 05 3月, 2005 1 次提交
    • T
      Replace the BufMgrLock with separate locks on the lookup hashtable and · 5d508736
      Tom Lane 提交于
      the freelist, plus per-buffer spinlocks that protect access to individual
      shared buffer headers.  This requires abandoning a global freelist (since
      the freelist is a global contention point), which shoots down ARC and 2Q
      as well as plain LRU management.  Adopt a clock sweep algorithm instead.
      Preliminary results show substantial improvement in multi-backend situations.
      5d508736
  16. 04 2月, 2005 1 次提交
  17. 01 1月, 2005 1 次提交
    • P
      · 2ff50159
      PostgreSQL Daemon 提交于
      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
  18. 17 10月, 2004 1 次提交
  19. 29 8月, 2004 2 次提交
  20. 18 6月, 2004 1 次提交
    • T
      Tablespaces. Alternate database locations are dead, long live tablespaces. · 2467394e
      Tom Lane 提交于
      There are various things left to do: contrib dbsize and oid2name modules
      need work, and so does the documentation.  Also someone should think about
      COMMENT ON TABLESPACE and maybe RENAME TABLESPACE.  Also initlocation is
      dead, it just doesn't know it yet.
      
      Gavin Sherry and Tom Lane.
      2467394e
  21. 22 4月, 2004 1 次提交
    • T
      Another round of code cleanup on bufmgr. Use BM_VALID flag to keep track · 95a03e9c
      Tom Lane 提交于
      of whether we have successfully read data into a buffer; this makes the
      error behavior a bit more transparent (IMHO anyway), and also makes it
      work correctly for local buffers which don't use Start/TerminateBufferIO.
      Collapse three separate functions for writing a shared buffer into one.
      This overlaps a bit with cleanups that Neil proposed awhile back, but
      seems not to have committed yet.
      95a03e9c
  22. 20 4月, 2004 1 次提交
    • T
      Code review for ARC patch. Eliminate static variables, improve handling · 011c3e62
      Tom Lane 提交于
      of VACUUM cases so that VACUUM requests don't affect the ARC state at all,
      avoid corner case where BufferSync would uselessly rewrite a buffer that
      no longer contains the page that was to be flushed.  Make some minor
      other cleanups in and around the bufmgr as well, such as moving PinBuffer
      and UnpinBuffer into bufmgr.c where they really belong.
      011c3e62
  23. 12 2月, 2004 1 次提交
  24. 16 1月, 2004 1 次提交
  25. 14 12月, 2003 1 次提交
    • N
      I posted some bufmgr cleanup a few weeks ago, but it conflicted with · fef0c834
      Neil Conway 提交于
      some concurrent changes Jan was making to the bufmgr. Here's an
      updated version of the patch -- it should apply cleanly to CVS
      HEAD and passes the regression tests.
      
      This patch makes the following changes:
      
           - remove the UnlockAndReleaseBuffer() and UnlockAndWriteBuffer()
             macros, and replace uses of them with calls to the appropriate
             functions.
      
           - remove a bunch of #ifdef BMTRACE code: it is ugly & broken
             (i.e. it doesn't compile)
      
           - make BufferReplace() return a bool, not an int
      
           - cleanup some logic in bufmgr.c; should be functionality
             equivalent to the previous code, just cleaner now
      
           - remove the BM_PRIVATE flag as it is unused
      
           - improve a few comments, etc.
      fef0c834
  26. 30 11月, 2003 1 次提交
    • P
      · 55b11325
      PostgreSQL Daemon 提交于
      make sure the $Id tags are converted to $PostgreSQL as well ...
      55b11325
  27. 13 11月, 2003 3 次提交
  28. 04 8月, 2003 1 次提交
  29. 28 7月, 2003 1 次提交
  30. 05 9月, 2002 1 次提交
  31. 06 8月, 2002 1 次提交
    • T
      Restructure local-buffer handling per recent pghackers discussion. · 5df307c7
      Tom Lane 提交于
      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
  32. 21 6月, 2002 1 次提交
  33. 16 6月, 2002 2 次提交
  34. 06 11月, 2001 1 次提交
  35. 28 10月, 2001 1 次提交
  36. 25 10月, 2001 1 次提交