1. 20 Aug, 2005 5 commits
    • 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
    • Tom Lane's avatar
      Invoke mksafefunc and mkunsafefunc with :: decoration. This seems a good · 2299ceab
      Tom Lane authored
      idea on consistency grounds, whether or not it really fixes bug #1831.
      Michael Fuhr
      2299ceab
    • Tatsuo Ishii's avatar
      ba2fc7eb
    • Tatsuo Ishii's avatar
      Add BackendXidGetPid(). · bc3991c1
      Tatsuo Ishii authored
      bc3991c1
    • Tom Lane's avatar
      Repair problems with VACUUM destroying t_ctid chains too soon, and with · f57e3f4c
      Tom Lane authored
      insufficient paranoia in code that follows t_ctid links.  (We must do both
      because even with VACUUM doing it properly, the intermediate state with
      a dangling t_ctid link is visible concurrently during lazy VACUUM, and
      could be seen afterwards if either type of VACUUM crashes partway through.)
      Also try to improve documentation about what's going on.  Patch is a bit
      bulky because passing the XMAX information around required changing the
      APIs of some low-level heapam.c routines, but it's not conceptually very
      complicated.  Per trouble report from Teodor and subsequent analysis.
      This needs to be back-patched, but I'll do that after 8.1 beta is out.
      f57e3f4c
  2. 19 Aug, 2005 2 commits
  3. 18 Aug, 2005 6 commits
  4. 17 Aug, 2005 8 commits
  5. 16 Aug, 2005 4 commits
  6. 15 Aug, 2005 8 commits
  7. 14 Aug, 2005 5 commits
  8. 13 Aug, 2005 2 commits
    • Tom Lane's avatar
      Tweak catalog cache management algorithms to reduce cost of · f60d176a
      Tom Lane authored
      SearchCatCacheList and ReleaseCatCacheList.  Previously, we incremented
      and decremented the refcounts of list member tuples along with the list
      itself, but that's unnecessary, and very expensive when the list is big.
      It's cheaper to change only the list refcount.  When we are considering
      deleting a cache entry, we have to check not only its own refcount but
      its parent list's ... but it's easy to arrange the code so that this
      check is not made in any commonly-used paths, so the cost is really nil.
      The bigger gain though is to refrain from DLMoveToFront'ing each individual
      member tuple each time the list is referenced.  To keep some semblance
      of fair space management, lists are just marked as used or not since the
      last cache cleanout search, and we do a MoveToFront pass only when about
      to run a cleanout.  In combination, these changes reduce the costs of
      SearchCatCacheList and ReleaseCatCacheList from about 4.5% of pgbench
      runtime to under 1%, according to my gprof results.
      f60d176a
    • Tom Lane's avatar
      Make pg_stat_file() use OUT parameters so that the user doesn't have to · 2af9a44f
      Tom Lane authored
      remember the output parameter set for himself.  It's a bit of a kluge
      but fixing array_in to work in bootstrap mode looks worse.
      I removed the separate pg_file_length() function, as it no longer has any
      real notational advantage --- you can write (pg_stat_file(...)).length.
      2af9a44f