Skip to content
Snippets Groups Projects
  1. Mar 18, 2001
  2. Mar 14, 2001
  3. Mar 13, 2001
    • Tom Lane's avatar
      XLOG (and related) changes: · 4d14fe00
      Tom Lane authored
      * 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
  4. Feb 26, 2001
    • Tom Lane's avatar
      Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occur · 9c993658
      Tom Lane authored
      only if at least N other backends currently have open transactions.  This
      is not a great deal of intelligence about whether a delay might be
      profitable ... but it beats no intelligence at all.  Note that the default
      COMMIT_DELAY is still zero --- this new code does nothing unless that
      setting is changed.
      Also, mark ENABLEFSYNC as a system-wide setting.  It's no longer safe to
      allow that to be set per-backend, since we may be relying on some other
      backend's fsync to have synced the WAL log.
      9c993658
  5. Feb 24, 2001
  6. Feb 23, 2001
  7. Feb 18, 2001
    • Tom Lane's avatar
      Change s_lock to not use any zero-delay select() calls; these are just a · 33cc5d8a
      Tom Lane authored
      waste of cycles on single-CPU machines, and of dubious utility on multi-CPU
      machines too.
      Tweak s_lock_stuck so that caller can specify timeout interval, and
      increase interval before declaring stuck spinlock for buffer locks and XLOG
      locks.
      On systems that have fdatasync(), use that rather than fsync() to sync WAL
      log writes.  Ensure that WAL file is entirely allocated during XLogFileInit.
      33cc5d8a
  8. Feb 17, 2001
  9. Feb 10, 2001
    • Tom Lane's avatar
      Restructure the key include files per recent pghackers discussion: there · d08741ea
      Tom Lane authored
      are now separate files "postgres.h" and "postgres_fe.h", which are meant
      to be the primary include files for backend .c files and frontend .c files
      respectively.  By default, only include files meant for frontend use are
      installed into the installation include directory.  There is a new make
      target 'make install-all-headers' that adds the whole content of the
      src/include tree to the installed fileset, for use by people who want to
      develop server-side code without keeping the complete source tree on hand.
      Cleaned up a whole lot of crufty and inconsistent header inclusions.
      d08741ea
  10. Feb 06, 2001
  11. Jan 26, 2001
  12. Jan 25, 2001
  13. Jan 24, 2001
  14. Jan 23, 2001
    • Tom Lane's avatar
      Fix all the places that called heap_update() and heap_delete() without · 786f1a59
      Tom Lane authored
      bothering to check the return value --- which meant that in case the
      update or delete failed because of a concurrent update, you'd not find
      out about it, except by observing later that the transaction produced
      the wrong outcome.  There are now subroutines simple_heap_update and
      simple_heap_delete that should be used anyplace that you're not prepared
      to do the full nine yards of coping with concurrent updates.  In
      practice, that seems to mean absolutely everywhere but the executor,
      because *noplace* else was checking.
      786f1a59
  15. Jan 22, 2001
    • Tom Lane's avatar
      Clean up lockmanager data structures some more, in preparation for planned · e84c4290
      Tom Lane authored
      rewrite of deadlock checking.  Lock holder objects are now reachable from
      the associated LOCK as well as from the owning PROC.  This makes it
      practical to find all the processes holding a lock, as well as all those
      waiting on the lock.  Also, clean up some of the grottier aspects of the
      SHMQueue API, and cause the waitProcs list to be stored in the intuitive
      direction instead of the nonintuitive one.  (Bet you didn't know that
      the code followed the 'prev' link to get to the next waiting process,
      instead of the 'next' link.  It doesn't do that anymore.)
      e84c4290
  16. Jan 21, 2001
  17. Jan 19, 2001
  18. Jan 16, 2001
  19. Jan 14, 2001
  20. Jan 12, 2001
    • Tom Lane's avatar
      Add more critical-section calls: all code sections that hold spinlocks · 6162432d
      Tom Lane authored
      are now critical sections, so as to ensure die() won't interrupt us while
      we are munging shared-memory data structures.  Avoid insecure intermediate
      states in some code that proc_exit will call, like palloc/pfree.  Rename
      START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be
      what people tend to call them anyway, and make them be called with () like
      a function call, in hopes of not confusing pg_indent.
      I doubt that this is sufficient to make SIGTERM safe anywhere; there's
      just too much code that could get invoked during proc_exit().
      6162432d
  21. Jan 10, 2001
  22. Jan 09, 2001
  23. Jan 08, 2001
  24. Jan 07, 2001
  25. Jan 02, 2001
    • Tom Lane's avatar
      Clean up non-reentrant interface for hash_seq/HashTableWalk, so that · 1b8a219e
      Tom Lane authored
      starting a new hashtable search no longer clobbers any other search
      active anywhere in the system.  Fix RelationCacheInvalidate() so that
      it will not crash or go into an infinite loop if invoked recursively,
      as for example by a second SI Reset message arriving while we are still
      processing a prior one.
      1b8a219e
  26. Dec 30, 2000
  27. Dec 29, 2000
  28. Dec 28, 2000
  29. Dec 22, 2000
    • Vadim B. Mikheev's avatar
      369aace5
    • Tom Lane's avatar
      Revise lock manager to support "session level" locks as well as "transaction · 6cc842ab
      Tom Lane authored
      level" locks.  A session lock is not released at transaction commit (but it
      is released on transaction abort, to ensure recovery after an elog(ERROR)).
      In VACUUM, use a session lock to protect the master table while vacuuming a
      TOAST table, so that the TOAST table can be done in an independent
      transaction.
      
      I also took this opportunity to do some cleanup and renaming in the lock
      code.  The previously noted bug in ProcLockWakeup, that it couldn't wake up
      any waiters beyond the first non-wakeable waiter, is now fixed.  Also found
      a previously unknown bug of the same kind (failure to scan all members of
      a lock queue in some cases) in DeadLockCheck.  This might have led to failure
      to detect a deadlock condition, resulting in indefinite waits, but it's
      difficult to characterize the conditions required to trigger a failure.
      6cc842ab
  30. Dec 20, 2000
Loading