1. 02 8月, 2007 1 次提交
  2. 06 1月, 2007 1 次提交
  3. 18 11月, 2006 1 次提交
    • T
      Repair two related errors in heap_lock_tuple: it was failing to recognize · 4f335a3d
      Tom Lane 提交于
      cases where we already hold the desired lock "indirectly", either via
      membership in a MultiXact or because the lock was originally taken by a
      different subtransaction of the current transaction.  These cases must be
      accounted for to avoid needless deadlocks and/or inappropriate replacement of
      an exclusive lock with a shared lock.  Per report from Clarence Gardner and
      subsequent investigation.
      4f335a3d
  4. 04 10月, 2006 1 次提交
  5. 20 7月, 2006 1 次提交
    • T
      Don't try to truncate multixact SLRU files in checkpoints done during xlog · 9dc842f0
      Tom Lane 提交于
      recovery.  In the first place, it doesn't work because slru's
      latest_page_number isn't set up yet (this is why we've been hearing reports
      of strange "apparent wraparound" log messages during crash recovery, but
      only from people who'd managed to advance their next-mxact counters some
      considerable distance from 0).  In the second place, it seems a bit unwise
      to be throwing away data during crash recovery anwyway.  This latter
      consideration convinces me to just disable truncation during recovery,
      rather than computing latest_page_number and pushing ahead.
      9dc842f0
  6. 14 7月, 2006 1 次提交
  7. 12 7月, 2006 1 次提交
  8. 24 3月, 2006 1 次提交
    • T
      Arrange to emit a description of the current XLOG record as error context · 0a202070
      Tom Lane 提交于
      when an error occurs during xlog replay.  Also, replace the former risky
      'write into a fixed-size buffer with no overflow detection' API for XLOG
      record description routines; use an expansible StringInfo instead.  (The
      latter accounts for most of the patch bulk.)
      
      Qingqing Zhou
      0a202070
  9. 05 3月, 2006 1 次提交
  10. 07 12月, 2005 2 次提交
    • T
      Get rid of slru.c's hardwired insistence on a fixed number of slots per · 887a7c61
      Tom Lane 提交于
      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
    • T
      Arrange for read-only accesses to SLRU page buffers to take only a shared · a615acf5
      Tom Lane 提交于
      lock, not exclusive, if the desired page is already in memory.  This can
      be demonstrated to be a significant win on the pg_subtrans cache when there
      is a large window of open transactions.  It should be useful for pg_clog
      as well.  I didn't try to make GetMultiXactIdMembers() use the code, as
      that would have taken some restructuring, and what with the local cache
      for multixact contents it probably wouldn't really make a difference.
      Per my recent proposal.
      a615acf5
  11. 23 11月, 2005 1 次提交
  12. 06 11月, 2005 1 次提交
  13. 29 10月, 2005 2 次提交
    • T
      Reorder code so that we don't have to hold a critical section while · a0379262
      Tom Lane 提交于
      reserving SLRU space for a new MultiXact.  The original coding would have
      treated out-of-disk-space as a PANIC condition, which is unnecessary.
      a0379262
    • T
      Fix race condition in multixact code: it's possible to try to read a · 1986ca5c
      Tom Lane 提交于
      multixact's starting offset before the offset has been stored into the
      SLRU file.  A simple fix would be to hold the MultiXactGenLock until the
      offset has been stored, but that looks like a big concurrency hit.  Instead
      rely on knowledge that unset offsets will be zero, and loop when we see
      a zero.  This requires a little extra hacking to ensure that zero is never
      a valid value for the offset.  Problem reported by Matteo Beccati, fix
      ideas from Martijn van Oosterhout, Alvaro Herrera, and Tom Lane.
      1986ca5c
  14. 15 10月, 2005 1 次提交
  15. 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
  16. 20 8月, 2005 1 次提交
  17. 02 8月, 2005 1 次提交
  18. 08 6月, 2005 1 次提交
  19. 20 5月, 2005 1 次提交
  20. 08 5月, 2005 1 次提交
  21. 04 5月, 2005 1 次提交
  22. 29 4月, 2005 1 次提交
    • T
      Implement sharable row-level locks, and use them for foreign key references · bedb78d3
      Tom Lane 提交于
      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