1. 30 May, 2006 1 commit
  2. 05 Mar, 2006 1 commit
  3. 04 Mar, 2006 1 commit
  4. 17 Jan, 2006 1 commit
  5. 08 Dec, 2005 1 commit
  6. 01 Dec, 2005 1 commit
  7. 22 Nov, 2005 1 commit
  8. 15 Oct, 2005 1 commit
  9. 08 Aug, 2005 1 commit
    • Tom Lane's avatar
      Cause ShutdownPostgres to do a normal transaction abort during backend · 7117cd3a
      Tom Lane authored
      exit, instead of trying to take shortcuts.  Introduce some additional
      shutdown callback routines to eliminate kluges like having ProcKill
      be responsible for shutting down the buffer manager.  Ensure that the
      order of operations during shutdown is predictable and what you would
      expect given the module layering.
      7117cd3a
  10. 07 Aug, 2005 1 commit
  11. 04 Jul, 2005 1 commit
    • Tom Lane's avatar
      Arrange for the postmaster (and standalone backends, initdb, etc) to · eb5949d1
      Tom Lane authored
      chdir into PGDATA and subsequently use relative paths instead of absolute
      paths to access all files under PGDATA.  This seems to give a small
      performance improvement, and it should make the system more robust
      against naive DBAs doing things like moving a database directory that
      has a live postmaster in it.  Per recent discussion.
      eb5949d1
  12. 19 Jun, 2005 1 commit
    • Tom Lane's avatar
      Simplify uses of readdir() by creating a function ReadDir() that · 3f749924
      Tom Lane authored
      includes error checking and an appropriate ereport(ERROR) message.
      This gets rid of rather tedious and error-prone manipulation of errno,
      as well as a Windows-specific bug workaround, at more than a dozen
      call sites.  After an idea in a recent patch by Heikki Linnakangas.
      3f749924
  13. 20 May, 2005 1 commit
  14. 31 Dec, 2004 1 commit
    • PostgreSQL Daemon's avatar
      · 2ff50159
      PostgreSQL Daemon authored
      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
  15. 29 Dec, 2004 1 commit
    • Tom Lane's avatar
      Refactor EXEC_BACKEND code so that postmaster child processes reattach · eee5abce
      Tom Lane authored
      to shared memory as soon as possible, ie, right after read_backend_variables.
      The effective difference from the original code is that this happens
      before instead of after read_nondefault_variables(), which loads GUC
      information and is apparently capable of expanding the backend's memory
      allocation more than you'd think it should.  This should fix the
      failure-to-attach-to-shared-memory reports we've been seeing on Windows.
      Also clean up a few bits of unnecessarily grotty EXEC_BACKEND code.
      eee5abce
  16. 16 Sep, 2004 1 commit
    • Tom Lane's avatar
      Restructure subtransaction handling to reduce resource consumption, · 8f9f1986
      Tom Lane authored
      as per recent discussions.  Invent SubTransactionIds that are managed like
      CommandIds (ie, counter is reset at start of each top transaction), and
      use these instead of TransactionIds to keep track of subtransaction status
      in those modules that need it.  This means that a subtransaction does not
      need an XID unless it actually inserts/modifies rows in the database.
      Accordingly, don't assign it an XID nor take a lock on the XID until it
      tries to do that.  This saves a lot of overhead for subtransactions that
      are only used for error recovery (eg plpgsql exceptions).  Also, arrange
      to release a subtransaction's XID lock as soon as the subtransaction
      exits, in both the commit and abort cases.  This avoids holding many
      unique locks after a long series of subtransactions.  The price is some
      additional overhead in XactLockTableWait, but that seems acceptable.
      Finally, restructure the state machine in xact.c to have a more orthogonal
      set of states for subtransactions.
      8f9f1986
  17. 29 Aug, 2004 2 commits
  18. 28 Jul, 2004 1 commit
    • Tom Lane's avatar
      Fix subtransaction behavior for large objects, temp namespace, files, · 1bf3d615
      Tom Lane authored
      password/group files.  Also allow read-only subtransactions of a read-write
      parent, but not vice versa.  These are the reasonably noncontroversial
      parts of Alvaro's recent mop-up patch, plus further work on large objects
      to minimize use of the TopTransactionResourceOwner.
      1bf3d615
  19. 31 May, 2004 1 commit
    • Tom Lane's avatar
      Per previous discussions, get rid of use of sync(2) in favor of · 9b178555
      Tom Lane authored
      explicitly fsync'ing every (non-temp) file we have written since the
      last checkpoint.  In the vast majority of cases, the burden of the
      fsyncs should fall on the bgwriter process not on backends.  (To this
      end, we assume that an fsync issued by the bgwriter will force out
      blocks written to the same file by other processes using other file
      descriptors.  Anyone have a problem with that?)  This makes the world
      safe for WIN32, which ain't even got sync(2), and really makes the world
      safe for Unixen as well, because sync(2) never had the semantics we need:
      it offers no way to wait for the requested I/O to finish.
      
      Along the way, fix a bug I recently introduced in xlog recovery:
      file truncation replay failed to clear bufmgr buffers for the dropped
      blocks, which could result in 'PANIC:  heap_delete_redo: no block'
      later on in xlog replay.
      9b178555
  20. 23 Feb, 2004 2 commits
    • Tom Lane's avatar
      Replace opendir/closedir calls throughout the backend with AllocateDir · 7a57a672
      Tom Lane authored
      and FreeDir routines modeled on the existing AllocateFile/FreeFile.
      Like the latter, these routines will avoid failing on EMFILE/ENFILE
      conditions whenever possible, and will prevent leakage of directory
      descriptors if an elog() occurs while one is open.
      Also, reduce PANIC to ERROR in MoveOfflineLogs() --- this is not
      critical code and there is no reason to force a DB restart on failure.
      All per recent trouble report from Olivier Hubaut.
      7a57a672
    • Tom Lane's avatar
      Do a direct probe during postmaster startup to determine the maximum · f83356c7
      Tom Lane authored
      number of openable files and the number already opened.  This eliminates
      depending on sysconf(_SC_OPEN_MAX), and allows much saner behavior on
      platforms where open-file slots are used up by semaphores.
      f83356c7
  21. 26 Jan, 2004 1 commit
  22. 20 Dec, 2003 1 commit
  23. 12 Dec, 2003 1 commit
  24. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  25. 25 Sep, 2003 1 commit
  26. 04 Aug, 2003 2 commits
  27. 24 Jul, 2003 1 commit
  28. 29 Apr, 2003 1 commit
  29. 04 Apr, 2003 1 commit
  30. 27 Mar, 2003 1 commit
    • Bruce Momjian's avatar
      This patch implements holdable cursors, following the proposal · 54f7338f
      Bruce Momjian authored
      (materialization into a tuple store) discussed on pgsql-hackers earlier.
      I've updated the documentation and the regression tests.
      
      Notes on the implementation:
      
      - I needed to change the tuple store API slightly -- it assumes that it
      won't be used to hold data across transaction boundaries, so the temp
      files that it uses for on-disk storage are automatically reclaimed at
      end-of-transaction. I added a flag to tuplestore_begin_heap() to control
      this behavior. Is changing the tuple store API in this fashion OK?
      
      - in order to store executor results in a tuple store, I added a new
      CommandDest. This works well for the most part, with one exception: the
      current DestFunction API doesn't provide enough information to allow the
      Executor to store results into an arbitrary tuple store (where the
      particular tuple store to use is chosen by the call site of
      ExecutorRun). To workaround this, I've temporarily hacked up a solution
      that works, but is not ideal: since the receiveTuple DestFunction is
      passed the portal name, we can use that to lookup the Portal data
      structure for the cursor and then use that to get at the tuple store the
      Portal is using. This unnecessarily ties the Portal code with the
      tupleReceiver code, but it works...
      
      The proper fix for this is probably to change the DestFunction API --
      Tom suggested passing the full QueryDesc to the receiveTuple function.
      In that case, callers of ExecutorRun could "subclass" QueryDesc to add
      any additional fields that their particular CommandDest needed to get
      access to. This approach would work, but I'd like to think about it for
      a little bit longer before deciding which route to go. In the mean time,
      the code works fine, so I don't think a fix is urgent.
      
      - (semi-related) I added a NO SCROLL keyword to DECLARE CURSOR, and
      adjusted the behavior of SCROLL in accordance with the discussion on
      -hackers.
      
      - (unrelated) Cleaned up some SGML markup in sql.sgml, copy.sgml
      
      Neil Conway
      54f7338f
  31. 02 Sep, 2002 2 commits
  32. 06 Aug, 2002 1 commit
    • Tom Lane's avatar
      Restructure local-buffer handling per recent pghackers discussion. · 5df307c7
      Tom Lane authored
      The local buffer manager is no longer used for newly-created relations
      (unless they are TEMP); a new non-TEMP relation goes through the shared
      bufmgr and thus will participate normally in checkpoints.  But TEMP relations
      use the local buffer manager throughout their lifespan.  Also, operations
      in TEMP relations are not logged in WAL, thus improving performance.
      Since it's no longer necessary to fsync relations as they move out of the
      local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code
      is no longer needed and has been removed: there's no concept of a dirty
      relation anymore in md.c/fd.c, and we never fsync anything but WAL.
      Still TODO: improve local buffer management algorithms so that it would
      be reasonable to increase NLocBuffer.
      5df307c7
  33. 20 Jun, 2002 1 commit
  34. 05 May, 2002 1 commit
  35. 06 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      Change made to elog: · 92288a1c
      Bruce Momjian authored
      o  Change all current CVS messages of NOTICE to WARNING.  We were going
      to do this just before 7.3 beta but it has to be done now, as you will
      see below.
      
      o Change current INFO messages that should be controlled by
      client_min_messages to NOTICE.
      
      o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
      to always go to the client.
      
      o Remove INFO from the client_min_messages options and add NOTICE.
      
      Seems we do need three non-ERROR elog levels to handle the various
      behaviors we need for these messages.
      
      Regression passed.
      92288a1c
  36. 02 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      Commit to match discussed elog() changes. Only update is that LOG is · a033daf5
      Bruce Momjian authored
      now just below FATAL in server_min_messages.  Added more text to
      highlight ordering difference between it and client_min_messages.
      
      ---------------------------------------------------------------------------
      
      REALLYFATAL => PANIC
      STOP => PANIC
      New INFO level the prints to client by default
      New LOG level the prints to server log by default
      Cause VACUUM information to print only to the client
      NOTICE => INFO where purely information messages are sent
      DEBUG => LOG for purely server status messages
      DEBUG removed, kept as backward compatible
      DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
      DebugLvl removed in favor of new DEBUG[1-5] symbols
      New server_min_messages GUC parameter with values:
              DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
      New client_min_messages GUC parameter with values:
              DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
      Server startup now logged with LOG instead of DEBUG
      Remove debug_level GUC parameter
      elog() numbers now start at 10
      Add test to print error message if older elog() values are passed to elog()
      Bootstrap mode now has a -d that requires an argument, like postmaster
      a033daf5