1. 11 6月, 2009 1 次提交
  2. 12 3月, 2009 1 次提交
    • T
      Code review for dtrace probes added (so far) to 8.4. Adjust placement of · e04810e8
      Tom Lane 提交于
      some bufmgr probes, take out redundant and memory-leak-inducing path arguments
      to smgr__md__read__done and smgr__md__write__done, fix bogus attempt to
      recalculate space used in sort__done, clean up formatting in places where
      I'm not sure pgindent will do a nice job by itself.
      e04810e8
  3. 12 1月, 2009 1 次提交
  4. 02 1月, 2009 1 次提交
  5. 17 12月, 2008 1 次提交
    • B
      The attached patch contains a couple of fixes in the existing probes and · 5a90bc1f
      Bruce Momjian 提交于
      includes a few new ones.
      
      - Fixed compilation errors on OS X for probes that use typedefs
      - Fixed a number of probes to pass ForkNumber per the relation forks
      patch
      - The new probes are those that were taken out from the previous
      submitted patch and required simple fixes. Will submit the other probes
      that may require more discussion in a separate patch.
      
      Robert Lor
      5a90bc1f
  6. 14 11月, 2008 1 次提交
  7. 11 11月, 2008 1 次提交
  8. 11 8月, 2008 1 次提交
    • H
      Introduce the concept of relation forks. An smgr relation can now consist · 3f0e808c
      Heikki Linnakangas 提交于
      of multiple forks, and each fork can be created and grown separately.
      
      The bulk of this patch is about changing the smgr API to include an extra
      ForkNumber argument in every smgr function. Also, smgrscheduleunlink and
      smgrdounlink no longer implicitly call smgrclose, because other forks might
      still exist after unlinking one. The callers of those functions have been
      modified to call smgrclose instead.
      
      This patch in itself doesn't have any user-visible effect, but provides the
      infrastructure needed for upcoming patches. The additional forks envisioned
      are a rewritten FSM implementation that doesn't rely on a fixed-size shared
      memory block, and a visibility map to allow skipping portions of a table in
      VACUUM that have no dead tuples.
      3f0e808c
  9. 02 5月, 2008 1 次提交
    • T
      Remove the recently added USE_SEGMENTED_FILES option, and indeed remove all · 3c6248a8
      Tom Lane 提交于
      support for a nonsegmented mode from md.c.  Per recent discussions, there
      doesn't seem to be much value in a "never segment" option as opposed to
      segmenting with a suitably large segment size.  So instead provide a
      configure-time switch to set the desired segment size in units of gigabytes.
      While at it, expose a configure switch for BLCKSZ as well.
      
      Zdenek Kotala
      3c6248a8
  10. 18 4月, 2008 1 次提交
    • H
      Fix two race conditions between the pending unlink mechanism that was put in · 9cb91f90
      Heikki Linnakangas 提交于
      place to prevent reusing relation OIDs before next checkpoint, and DROP
      DATABASE. First, if a database was dropped, bgwriter would still try to unlink
      the files that the rmtree() call by the DROP DATABASE command has already
      deleted, or is just about to delete. Second, if a database is dropped, and
      another database is created with the same OID, bgwriter would in the worst
      case delete a relation in the new database that happened to get the same OID
      as a dropped relation in the old database.
      
      To fix these race conditions:
      - make rmtree() ignore ENOENT errors. This fixes the 1st race condition.
      - make ForgetDatabaseFsyncRequests forget unlink requests as well.
      - force checkpoint on in dropdb on all platforms
      
      Since ForgetDatabaseFsyncRequests() is asynchronous, the 2nd change isn't
      enough on its own to fix the problem of dropping and creating a database with
      same OID, but forcing a checkpoint on DROP DATABASE makes it sufficient.
      
      Per Tom Lane's bug report and proposal. Backpatch to 8.3.
      9cb91f90
  11. 11 3月, 2008 1 次提交
  12. 02 1月, 2008 1 次提交
  13. 16 11月, 2007 5 次提交
  14. 03 7月, 2007 1 次提交
    • T
      Fix incorrect comment about the timing of AbsorbFsyncRequests() during · 83aaebba
      Tom Lane 提交于
      checkpoint.  The comment claimed that we could do this anytime after
      setting the checkpoint REDO point, but actually BufferSync is relying
      on the assumption that buffers dumped by other backends will be fsync'd
      too.  So we really could not do it any sooner than we are doing it.
      83aaebba
  15. 13 4月, 2007 1 次提交
    • T
      Rearrange mdsync() looping logic to avoid the problem that a sufficiently · 995ba280
      Tom Lane 提交于
      fast flow of new fsync requests can prevent mdsync() from ever completing.
      This was an unforeseen consequence of a patch added in Mar 2006 to prevent
      the fsync request queue from overflowing.  Problem identified by Heikki
      Linnakangas and independently by ITAGAKI Takahiro; fix based on ideas from
      Takahiro-san, Heikki, and Tom.
      
      Back-patch as far as 8.1 because a previous back-patch introduced the problem
      into 8.1 ...
      995ba280
  16. 18 1月, 2007 1 次提交
  17. 17 1月, 2007 1 次提交
    • T
      Revise bgwriter fsync-request mechanism to improve robustness when a table · 6d660587
      Tom Lane 提交于
      is deleted.  A backend about to unlink a file now sends a "revoke fsync"
      request to the bgwriter to make it clean out pending fsync requests.  There
      is still a race condition where the bgwriter may try to fsync after the unlink
      has happened, but we can resolve that by rechecking the fsync request queue
      to see if a revoke request arrived meanwhile.  This eliminates the former
      kluge of "just assuming" that an ENOENT failure is okay, and lets us handle
      the fact that on Windows it might be EACCES too without introducing any
      questionable assumptions.  After an idea of mine improved by Magnus.
      
      The HEAD patch doesn't apply cleanly to 8.2, but I'll see about a back-port
      later.  In the meantime this could do with some testing on Windows; I've been
      able to force it through the code path via ENOENT, but that doesn't prove that
      it actually fixes the Windows problem ...
      6d660587
  18. 06 1月, 2007 1 次提交
  19. 04 1月, 2007 1 次提交
    • T
      Clean up smgr.c/md.c APIs as per discussion a couple months ago. Instead of · ef072219
      Tom Lane 提交于
      having md.c return a success/failure boolean to smgr.c, which was just going
      to elog anyway, let md.c issue the elog messages itself.  This allows better
      error reporting, particularly in cases such as "short read" or "short write"
      which Peter was complaining of.  Also, remove the kluge of allowing mdread()
      to return zeroes from a read-beyond-EOF: this is now an error condition
      except when InRecovery or zero_damaged_pages = true.  (Hash indexes used to
      require that behavior, but no more.)  Also, enforce that mdwrite() is to be
      used for rewriting existing blocks while mdextend() is to be used for
      extending the relation EOF.  This restriction lets us get rid of the old
      ad-hoc defense against creating huge files by an accidental reference to
      a bogus block number: we'll only create new segments in mdextend() not
      mdwrite() or mdread().  (Again, when InRecovery we allow it anyway, since
      we need to allow updates of blocks that were later truncated away.)
      Also, clean up the original makeshift patch for bug #2737: move the
      responsibility for padding relation segments to full length into md.c.
      ef072219
  20. 20 11月, 2006 1 次提交
    • T
      When truncating a relation in-place (eg during VACUUM), do not try to unlink · 1a5c450f
      Tom Lane 提交于
      any no-longer-needed segments; just truncate them to zero bytes and leave
      the files in place for possible future re-use.  This avoids problems when
      the segments are re-used due to relation growth shortly after truncation.
      Before, the bgwriter, and possibly other backends, could still be holding
      open file references to the old segment files, and would write dirty blocks
      into those files where they'd disappear from the view of other processes.
      
      Back-patch as far as 8.0.  I believe the 7.x branches are not vulnerable,
      because they had no bgwriter, and "blind" writes by other backends would
      always be done via freshly-opened file references.
      1a5c450f
  21. 04 10月, 2006 1 次提交
  22. 14 7月, 2006 1 次提交
  23. 05 3月, 2006 1 次提交
  24. 03 3月, 2006 1 次提交
    • T
      Arrange to call AbsorbFsyncRequests every so often while performing a · 9a506a62
      Tom Lane 提交于
      checkpoint in the bgwriter.  This forestalls overflow of the fsync request
      queue, which is not fatal but causes considerable performance degradation
      when it occurs (because backends then have to do their own fsyncs).  Per
      patch from Itagaki Takahiro, modified a little bit by me.
      9a506a62
  25. 15 10月, 2005 1 次提交
  26. 04 7月, 2005 1 次提交
    • T
      Arrange for the postmaster (and standalone backends, initdb, etc) to · eb5949d1
      Tom Lane 提交于
      chdir into PGDATA and subsequently use relative paths instead of absolute
      paths to access all files under PGDATA.  This seems to give a small
      performance improvement, and it should make the system more robust
      against naive DBAs doing things like moving a database directory that
      has a live postmaster in it.  Per recent discussion.
      eb5949d1
  27. 21 6月, 2005 1 次提交
  28. 29 5月, 2005 1 次提交
    • T
      Modify hash_search() API to prevent future occurrences of the error · e92a8827
      Tom Lane 提交于
      spotted by Qingqing Zhou.  The HASH_ENTER action now automatically
      fails with elog(ERROR) on out-of-memory --- which incidentally lets
      us eliminate duplicate error checks in quite a bunch of places.  If
      you really need the old return-NULL-on-out-of-memory behavior, you
      can ask for HASH_ENTER_NULL.  But there is now an Assert in that path
      checking that you aren't hoping to get that behavior in a palloc-based
      hash table.
      Along the way, remove the old HASH_FIND_SAVE/HASH_REMOVE_SAVED actions,
      which were not being used anywhere anymore, and were surely too ugly
      and unsafe to want to see revived again.
      e92a8827
  29. 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
  30. 25 10月, 2004 1 次提交
  31. 30 8月, 2004 2 次提交
  32. 29 8月, 2004 2 次提交
  33. 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
  34. 03 6月, 2004 1 次提交
    • T
      Adjust btree index build to not use shared buffers, thereby avoiding the · 2095206d
      Tom Lane 提交于
      locking conflict against concurrent CHECKPOINT that was discussed a few
      weeks ago.  Also, if not using WAL archiving (which is always true ATM
      but won't be if PITR makes it into this release), there's no need to
      WAL-log the index build process; it's sufficient to force-fsync the
      completed index before commit.  This seems to gain about a factor of 2
      in my tests, which is consistent with writing half as much data.  I did
      not try it with WAL on a separate drive though --- probably the gain would
      be a lot less in that scenario.
      2095206d