1. 11 Jun, 2001 1 commit
  2. 07 Jun, 2001 1 commit
  3. 03 Jun, 2001 1 commit
  4. 30 May, 2001 1 commit
  5. 25 May, 2001 2 commits
  6. 19 Apr, 2001 1 commit
  7. 22 Mar, 2001 1 commit
  8. 14 Mar, 2001 1 commit
  9. 13 Mar, 2001 1 commit
    • 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
  10. 20 Feb, 2001 1 commit
  11. 11 Feb, 2001 1 commit
  12. 10 Feb, 2001 1 commit
    • 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
  13. 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
  14. 27 Jan, 2001 1 commit
  15. 24 Jan, 2001 1 commit
  16. 28 Dec, 2000 1 commit
  17. 20 Dec, 2000 1 commit
  18. 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
  19. 03 Dec, 2000 1 commit
  20. 30 Nov, 2000 1 commit
  21. 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
  22. 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
  23. 27 Nov, 2000 1 commit
  24. 25 Nov, 2000 3 commits
  25. 21 Nov, 2000 1 commit
  26. 15 Nov, 2000 1 commit
  27. 14 Nov, 2000 3 commits
  28. 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
  29. 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
  30. 09 Nov, 2000 1 commit
  31. 08 Nov, 2000 1 commit
  32. 06 Nov, 2000 1 commit