1. 12 8月, 2005 1 次提交
    • T
      Solve the problem of OID collisions by probing for duplicate OIDs · 721e5378
      Tom Lane 提交于
      whenever we generate a new OID.  This prevents occasional duplicate-OID
      errors that can otherwise occur once the OID counter has wrapped around.
      Duplicate relfilenode values are also checked for when creating new
      physical files.  Per my recent proposal.
      721e5378
  2. 14 4月, 2005 1 次提交
    • T
      Simplify initdb-time assignment of OIDs as I proposed yesterday, and · 2193a856
      Tom Lane 提交于
      avoid encroaching on the 'user' range of OIDs by allowing automatic
      OID assignment to use values below 16k until we reach normal operation.
      
      initdb not forced since this doesn't make any incompatible change;
      however a lot of stuff will have different OIDs after your next initdb.
      2193a856
  3. 21 2月, 2005 1 次提交
    • T
      Remove some no-longer-needed kluges for bootstrapping, in particular · 4aefe755
      Tom Lane 提交于
      the AMI_OVERRIDE flag.  The fact that TransactionLogFetch treats
      BootstrapTransactionId as always committed is sufficient to make
      bootstrap work, and getting rid of extra tests in heavily used code
      paths seems like a win.  The files produced by initdb are demonstrably
      the same after this change.
      4aefe755
  4. 20 2月, 2005 1 次提交
    • T
      Add code to prevent transaction ID wraparound by enforcing a safe limit · 60b2444c
      Tom Lane 提交于
      in GetNewTransactionId().  Since the limit value has to be computed
      before we run any real transactions, this requires adding code to database
      startup to scan pg_database and determine the oldest datfrozenxid.
      This can conveniently be combined with the first stage of an attack on
      the problem that the 'flat file' copies of pg_shadow and pg_group are
      not properly updated during WAL recovery.  The code I've added to
      startup resides in a new file src/backend/utils/init/flatfiles.c, and
      it is responsible for rewriting the flat files as well as initializing
      the XID wraparound limit value.  This will eventually allow us to get
      rid of GetRawDatabaseInfo too, but we'll need an initdb so we can add
      a trigger to pg_database.
      60b2444c
  5. 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
  6. 29 8月, 2004 1 次提交
  7. 01 7月, 2004 1 次提交
  8. 30 11月, 2003 1 次提交
    • P
      · 55b11325
      PostgreSQL Daemon 提交于
      make sure the $Id tags are converted to $PostgreSQL as well ...
      55b11325
  9. 04 8月, 2003 1 次提交
  10. 21 6月, 2002 1 次提交
  11. 26 5月, 2002 1 次提交
  12. 06 11月, 2001 1 次提交
  13. 28 10月, 2001 1 次提交
  14. 25 10月, 2001 1 次提交
  15. 29 9月, 2001 1 次提交
    • T
      Implement new 'lightweight lock manager' that's intermediate between · 499abb0c
      Tom Lane 提交于
      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
  16. 27 8月, 2001 1 次提交
  17. 26 8月, 2001 1 次提交
    • T
      Replace implementation of pg_log as a relation accessed through the · 2589735d
      Tom Lane 提交于
      buffer manager with 'pg_clog', a specialized access method modeled
      on pg_xlog.  This simplifies startup (don't need to play games to
      open pg_log; among other things, OverrideTransactionSystem goes away),
      should improve performance a little, and opens the door to recycling
      commit log space by removing no-longer-needed segments of the commit
      log.  Actual recycling is not there yet, but I felt I should commit
      this part separately since it'd still be useful if we chose not to
      do transaction ID wraparound.
      2589735d
  18. 24 8月, 2001 1 次提交
  19. 11 8月, 2001 1 次提交
    • T
      Make OIDs optional, per discussions in pghackers. WITH OIDS is still the · bf56f075
      Tom Lane 提交于
      default, but OIDS are removed from many system catalogs that don't need them.
      Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
      pg_description has a three-column key instead of one.
      
      Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
      has some usefulness; pg_dump dumps comments on indexes, rules, and
      triggers in a valid order.
      
      initdb forced.
      bf56f075
  20. 12 7月, 2001 1 次提交
  21. 25 5月, 2001 2 次提交
  22. 15 5月, 2001 1 次提交
  23. 22 3月, 2001 1 次提交
  24. 19 3月, 2001 1 次提交
  25. 13 3月, 2001 1 次提交
    • T
      XLOG (and related) changes: · 4d14fe00
      Tom Lane 提交于
      * Store two past checkpoint locations, not just one, in pg_control.
        On startup, we fall back to the older checkpoint if the newer one
        is unreadable.  Also, a physical copy of the newest checkpoint record
        is kept in pg_control for possible use in disaster recovery (ie,
        complete loss of pg_xlog).  Also add a version number for pg_control
        itself.  Remove archdir from pg_control; it ought to be a GUC
        parameter, not a special case (not that it's implemented yet anyway).
      
      * Suppress successive checkpoint records when nothing has been entered
        in the WAL log since the last one.  This is not so much to avoid I/O
        as to make it actually useful to keep track of the last two
        checkpoints.  If the things are right next to each other then there's
        not a lot of redundancy gained...
      
      * Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs
        on alternate bytes.  Polynomial borrowed from ECMA DLT1 standard.
      
      * Fix XLOG record length handling so that it will work at BLCKSZ = 32k.
      
      * Change XID allocation to work more like OID allocation.  (This is of
        dubious necessity, but I think it's a good idea anyway.)
      
      * Fix a number of minor bugs, such as off-by-one logic for XLOG file
        wraparound at the 4 gig mark.
      
      * Add documentation and clean up some coding infelicities; move file
        format declarations out to include files where planned contrib
        utilities can get at them.
      
      * Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or
        every CHECKPOINT_TIMEOUT seconds, whichever comes first.  It is also
        possible to force a checkpoint by sending SIGUSR1 to the postmaster
        (undocumented feature...)
      
      * Defend against kill -9 postmaster by storing shmem block's key and ID
        in postmaster.pid lockfile, and checking at startup to ensure that no
        processes are still connected to old shmem block (if it still exists).
      
      * Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency
        stop, for symmetry with postmaster and xlog utilities.  Clean up signal
        handling in bootstrap.c so that xlog utilities launched by postmaster
        will react to signals better.
      
      * Standalone bootstrap now grabs lockfile in target directory, as added
        insurance against running it in parallel with live postmaster.
      4d14fe00
  26. 25 1月, 2001 1 次提交
  27. 30 11月, 2000 1 次提交
  28. 22 11月, 2000 1 次提交
  29. 03 11月, 2000 1 次提交
  30. 29 10月, 2000 1 次提交
  31. 26 1月, 2000 1 次提交
    • B
      Add: · 5c25d602
      Bruce Momjian 提交于
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  32. 16 7月, 1999 1 次提交
  33. 10 6月, 1999 1 次提交
    • V
      1. Fix for elog(ERROR, "EvalPlanQual: t_xmin is uncommitted ?!") · 78f7ccc9
      Vadim B. Mikheev 提交于
         and possibly for other cases too:
      
         DO NOT cache status of transaction in unknown state
         (i.e. non-committed and non-aborted ones)
      
         Example:
         T1 reads row updated/inserted by running T2 and cache T2 status.
         T2 commits.
         Now T1 reads a row updated by T2 and with HEAP_XMAX_COMMITTED
         in t_infomask (so cached T2 status is not changed).
         Now T1 EvalPlanQual gets updated row version without HEAP_XMIN_COMMITTED
         -> TransactionIdDidCommit(t_xmin) and TransactionIdDidAbort(t_xmin)
         return FALSE and T2 decides that t_xmin is not committed and gets
         ERROR above.
      
         It's too late to find more smart way to handle such cases and so
         I just changed xact status caching and got rid TransactionIdFlushCache()
         from code.
      
         Changed: transam.c, xact.c, lmgr.c and transam.h - last three
         just because of TransactionIdFlushCache() is removed.
      
      2. heapam.c:
      
         T1 marked a row for update. T2 waits for T1 commit/abort.
         T1 commits. T3 updates the row before T2 locks row page.
         Now T2 sees that new row t_xmax is different from xact id (T1)
         T2 was waiting for. Old code did Assert here. New one goes to
         HeapTupleSatisfiesUpdate. Obvious changes too.
      
      3. Added Assert to vacuum.c
      4. bufmgr.c: break
         Assert(buf->r_locks == 0 && !buf->ri_lock)
         into two Asserts.
      78f7ccc9
  34. 26 5月, 1999 2 次提交
  35. 14 2月, 1999 1 次提交
  36. 18 12月, 1998 1 次提交
  37. 16 12月, 1998 1 次提交
  38. 01 9月, 1998 1 次提交