1. 08 Feb, 2001 1 commit
    • Tom Lane's avatar
      When launching a child backend, take care to close file descriptors for · 897a895d
      Tom Lane authored
      any other client connections that may exist (which would only happen if
      another client is currently in the authentication cycle).  This avoids
      wastage of open descriptors in a child.  It might also explain peculiar
      behaviors like not closing connections when expected, since the kernel
      will probably not signal EOF as long as some other backend is randomly
      holding open a reference to the connection, even if the client went away
      long since ...
      897a895d
  2. 27 Jan, 2001 1 commit
  3. 24 Jan, 2001 1 commit
  4. 28 Dec, 2000 1 commit
  5. 20 Dec, 2000 1 commit
  6. 18 Dec, 2000 2 commits
    • Bruce Momjian's avatar
      >> Here is a patch for the beos port (All regression tests are OK). · 1f159e56
      Bruce Momjian authored
      >>     xlog.c : special case for beos to avoid 'link' which does not work yet
      >>     beos/sem.c : implementation of new sem_ctl call (GETPID) and a new
      >sem_op
      >> flag (IPCNOWAIT)
      >>     dynloader/beos.c : add a verification of symbol validity (seem that
      the
      >> loader sometime return OK with an invalid symbol)
      >>     postmaster.c :  add beos forking support for the new checkpoint
      process
      >>     postgres.c : remove beos special case for getrusage
      >>     beos.h : Correction of a bas definition of AF_UNIX, misc defnitions
      >>
      >>
      >>     thanks
      >>
      >>
      >>             cyril
      
      Cyril VELTER
      1f159e56
    • Tom Lane's avatar
      Ensure that 'errno' is saved and restored by all signal handlers that · 5491233f
      Tom Lane authored
      might change it.  Experimentation shows that the signal handler call
      mechanism does not save/restore errno for you, at least not on Linux
      or HPUX, so this is definitely a real risk.
      5491233f
  7. 03 Dec, 2000 1 commit
  8. 30 Nov, 2000 1 commit
  9. 29 Nov, 2000 2 commits
    • Tom Lane's avatar
      Just noticed that with -S switch, MyProcPid is permanently wrong in · 3c0f3c9a
      Tom Lane authored
      postmaster, because it isn't updated after forking away from the terminal.
      Apparently it's not used anyplace in the postmaster ... but seems best
      to make it show the correct PID ...
      3c0f3c9a
    • Tom Lane's avatar
      Get rid of not-very-portable fcntl(F_SETLK) mechanism for locking the Unix · 792b0f46
      Tom Lane authored
      socket file, in favor of having an ordinary lockfile beside the socket file.
      Clean up a few robustness problems in the lockfile code.  If postmaster is
      going to reject a connection request based on database state, it will now
      tell you so before authentication exchange not after.  (Of course, a failure
      after is still possible if conditions change meanwhile, but this makes life
      easier for a yet-to-be-written pg_ping utility.)
      792b0f46
  10. 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
  11. 27 Nov, 2000 1 commit
  12. 25 Nov, 2000 3 commits
  13. 21 Nov, 2000 1 commit
  14. 15 Nov, 2000 1 commit
  15. 14 Nov, 2000 3 commits
  16. 13 Nov, 2000 2 commits
    • Bruce Momjian's avatar
      Remove -k unix socketpath option from client side, allow hostname with · ebd61ac0
      Bruce Momjian authored
      leading slash to behave as a unix socket path.
      ebd61ac0
    • Bruce Momjian's avatar
      UUNET is looking into offering PostgreSQL as a part of a managed web · 2150c2ed
      Bruce Momjian authored
      hosting product, on both shared and dedicated machines.  We currently
      offer Oracle and MySQL, and it would be a nice middle-ground.
      However, as shipped, PostgreSQL lacks the following features we need
      that MySQL has:
      
      1. The ability to listen only on a particular IP address.  Each
         hosting customer has their own IP address, on which all of their
         servers (http, ftp, real media, etc.) run.
      2. The ability to place the Unix-domain socket in a mode 700 directory.
         This allows us to automatically create an empty database, with an
         empty DBA password, for new or upgrading customers without having
         to interactively set a DBA password and communicate it to (or from)
         the customer.  This in turn cuts down our install and upgrade times.
      3. The ability to connect to the Unix-domain socket from within a
         change-rooted environment.  We run CGI programs chrooted to the
         user's home directory, which is another reason why we need to be
         able to specify where the Unix-domain socket is, instead of /tmp.
      4. The ability to, if run as root, open a pid file in /var/run as
         root, and then setuid to the desired user.  (mysqld -u can almost
         do this; I had to patch it, too).
      
      The patch below fixes problem 1-3.  I plan to address #4, also, but
      haven't done so yet.  These diffs are big enough that they should give
      the PG development team something to think about in the meantime :-)
      Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
      out what I have, which works (for the problems it tackles), now.
      
      With these changes, we can set up and run PostgreSQL with scripts the
      same way we can with apache or proftpd or mysql.
      
      In summary, this patch makes the following enhancements:
      
      1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
         and command line options -k --unix-socket to the relevant programs.
      2. Adds a -h option to postmaster to set the hostname or IP address to
         listen on instead of the default INADDR_ANY.
      3. Extends some library interfaces to support the above.
      4. Fixes a few memory leaks in PQconnectdb().
      
      The default behavior is unchanged from stock 7.0.2; if you don't use
      any of these new features, they don't change the operation.
      
      David J. MacKenzie
      2150c2ed
  17. 12 Nov, 2000 1 commit
    • Tom Lane's avatar
      Keep track of the last active slot in the shared ProcState array, so · ebb0a201
      Tom Lane authored
      that search loops only have to scan that far and not through all maxBackends
      entries.  This eliminates a performance penalty for setting maxBackends
      much higher than the average number of active backends.  Also, eliminate
      no-longer-used 'backend tag' concept.  Remove setting of environment
      variables at backend start (except for CYR_RECODE), since none of them
      are being examined by the backend any longer.
      ebb0a201
  18. 09 Nov, 2000 1 commit
  19. 08 Nov, 2000 1 commit
  20. 06 Nov, 2000 1 commit
  21. 04 Nov, 2000 1 commit
  22. 01 Nov, 2000 1 commit
  23. 28 Oct, 2000 1 commit
  24. 25 Oct, 2000 1 commit
  25. 24 Oct, 2000 1 commit
  26. 21 Oct, 2000 1 commit
  27. 16 Oct, 2000 1 commit
  28. 11 Oct, 2000 2 commits
  29. 08 Oct, 2000 1 commit
  30. 03 Oct, 2000 1 commit
    • Bruce Momjian's avatar
      New diff that now covers the entire tree. Applying this gets postgresql · 87c0e623
      Bruce Momjian authored
      working on the VERY latest version of BeOS.  I'm sure there will be
      alot of comments, but then if there weren't I'd be disappointed!
      
      Thanks for your continuing efforts to get this into your tree.
      
      Haven't bothered with the new files as they haven't changed.
      
      BTW Peter, the compiler is "broken" about the bool define and so on.
      I'm filing a bug report to try and get it addressed.  Hopefully then we
      can tidy up the code a bit.
      
      I await the replies with interest :)
      
      David Reid
      87c0e623
  31. 02 Oct, 2000 1 commit
  32. 06 Sep, 2000 1 commit