1. 21 Sep, 2001 1 commit
    • Tom Lane's avatar
      Add an overall timeout on the client authentication cycle, so that · 35b7601b
      Tom Lane authored
      a hung client or lost connection can't indefinitely block a postmaster
      child (not to mention the possibility of deliberate DoS attacks).
      Timeout is controlled by new authentication_timeout GUC variable,
      which I set to 60 seconds by default ... does that seem reasonable?
      35b7601b
  2. 07 Sep, 2001 1 commit
  3. 06 Jul, 2001 1 commit
  4. 16 Jun, 2001 1 commit
    • Tom Lane's avatar
      Tweak startup sequence so that running out of PROC array slots is · 2917f0a5
      Tom Lane authored
      detected sooner in backend startup, and is treated as an expected error
      (it gives 'Sorry, too many clients already' now).  This allows us not
      to have to enforce the MaxBackends limit exactly in the postmaster.
      Also, remove ProcRemove() and fold its functionality into ProcKill().
      There's no good reason for a backend not to be responsible for removing
      its PROC entry, and there are lots of good reasons for the postmaster
      not to be touching shared-memory data structures.
      2917f0a5
  5. 25 May, 2001 2 commits
  6. 22 Mar, 2001 1 commit
  7. 26 Feb, 2001 1 commit
    • 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
  8. 25 Jan, 2001 1 commit
  9. 24 Jan, 2001 1 commit
  10. 22 Jan, 2001 1 commit
    • 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
  11. 16 Jan, 2001 2 commits
  12. 14 Jan, 2001 1 commit
  13. 22 Dec, 2000 1 commit
    • 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
  14. 28 Nov, 2000 1 commit
    • Tom Lane's avatar
      Significant cleanups in SysV IPC handling (shared mem and semaphores). · c715fdea
      Tom Lane authored
      IPC key assignment will now work correctly even when multiple postmasters
      are using same logical port number (which is possible given -k switch).
      There is only one shared-mem segment per postmaster now, not 3.
      Rip out broken code for non-TAS case in bufmgr and xlog, substitute a
      complete S_LOCK emulation using semaphores in spin.c.  TAS and non-TAS
      logic is now exactly the same.
      When deadlock is detected, "Deadlock detected" is now the elog(ERROR)
      message, rather than a NOTICE that comes out before an unhelpful ERROR.
      c715fdea
  15. 31 May, 2000 1 commit
    • Peter Eisentraut's avatar
      The heralded `Grand Unified Configuration scheme' (GUC) · 6a68f426
      Peter Eisentraut authored
      That means you can now set your options in either or all of $PGDATA/configuration,
      some postmaster option (--enable-fsync=off), or set a SET command. The list of
      options is in backend/utils/misc/guc.c, documentation will be written post haste.
      
      pg_options is gone, so is that pq_geqo config file. Also removed were backend -K,
      -Q, and -T options (no longer applicable, although -d0 does the same as -Q).
      
      Added to configure an --enable-syslog option.
      
      changed all callers from TPRINTF to elog(DEBUG)
      6a68f426
  16. 12 Apr, 2000 1 commit
  17. 22 Feb, 2000 1 commit
  18. 26 Jan, 2000 1 commit
    • Bruce Momjian's avatar
      Add: · 5c25d602
      Bruce Momjian authored
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  19. 27 Sep, 1999 1 commit
  20. 24 Sep, 1999 1 commit
    • Tom Lane's avatar
      Several changes here, not very related but touching some of the same files. · e812458b
      Tom Lane authored
      * Buffer refcount cleanup (per my "progress report" to pghackers, 9/22).
      * Add links to backend PROC structs to sinval's array of per-backend info,
      and use these links for routines that need to check the state of all
      backends (rather than the slow, complicated search of the ShmemIndex
      hashtable that was used before).  Add databaseOID to PROC structs.
      * Use this to implement an interlock that prevents DESTROY DATABASE of
      a database containing running backends.  (It's a little tricky to prevent
      a concurrently-starting backend from getting in there, since the new
      backend is not able to lock anything at the time it tries to look up
      its database in pg_database.  My solution is to recheck that the DB is
      OK at the end of InitPostgres.  It may not be a 100% solution, but it's
      a lot better than no interlock at all...)
      * In ALTER TABLE RENAME, flush buffers for the relation before doing the
      rename of the physical files, to ensure we don't get failures later from
      mdblindwrt().
      * Update TRUNCATE patch so that it actually compiles against current
      sources :-(.
      You should do "make clean all" after pulling these changes.
      e812458b
  21. 15 Jul, 1999 1 commit
  22. 25 May, 1999 2 commits
  23. 13 May, 1999 1 commit
    • Bruce Momjian's avatar
      Hi, Bruce! · 564842a6
      Bruce Momjian authored
      These are my last changes to lmgr fixing deadlock handling.
      Please apply them to cvs...
      
      Vadim
      564842a6
  24. 07 May, 1999 1 commit
  25. 19 Feb, 1999 2 commits
    • Tom Lane's avatar
      Reorder startup ops so that if preallocation of semas fails, · 4c313931
      Tom Lane authored
      postmaster will release whatever it did get before dying.
      4c313931
    • Tom Lane's avatar
      Allow maximum number of backends to be set at configure time · e77b630c
      Tom Lane authored
      (--with-maxbackends).  Add a postmaster switch (-N backends) that allows
      the limit to be reduced at postmaster start time.  (You can't increase it,
      sorry to say, because there are still some fixed-size arrays.)
      Grab the number of semaphores indicated by min(MAXBACKENDS, -N) at
      postmaster startup, so that this particular form of bogus configuration
      is exposed immediately rather than under heavy load.
      e77b630c
  26. 15 Feb, 1999 1 commit
  27. 13 Feb, 1999 1 commit
  28. 15 Dec, 1998 1 commit
  29. 01 Sep, 1998 1 commit
  30. 25 Aug, 1998 1 commit
    • Marc G. Fournier's avatar
      · 7dbcf31b
      Marc G. Fournier authored
      From: Massimo Dal Zotto <dz@cs.unitn.it>
      
      lock.patch
      
              I have rewritten lock.c cleaning up the code and adding better
              assert checking I have also added some fields to the lock and
              xid tags for better support of user locks. There is also a new
              function which returns an array of pids owning a lock.
              I'm using this code from over six months and it works fine.
      7dbcf31b
  31. 27 Jul, 1998 1 commit
  32. 30 Jun, 1998 1 commit
  33. 26 Feb, 1998 1 commit
  34. 25 Jan, 1998 1 commit
  35. 23 Jan, 1998 1 commit
  36. 08 Sep, 1997 1 commit