1. 27 Jun, 2006 1 commit
  2. 18 Jun, 2006 1 commit
  3. 08 Jun, 2006 1 commit
    • Tom Lane's avatar
      Fix bootstrap.c so that database startup process and bgwriter properly release · 1358466a
      Tom Lane authored
      LWLocks during a panic exit.  This avoids the possible self-deadlock pointed
      out by Qingqing Zhou.  Also, I noted that an error during LoadFreeSpaceMap()
      or BuildFlatFiles() would result in exit(0) which would leave the postmaster
      thinking all is well.  Added a critical section to ensure such errors don't
      allow startup to proceed.
      
      Backpatched to 8.1.  The 8.0 code is a bit different and I'm not sure if the
      problem exists there; given we've not seen this reported from the field, I'm
      going to be conservative about backpatching any further.
      1358466a
  4. 10 May, 2006 1 commit
    • Tom Lane's avatar
      Clean up code associated with updating pg_class statistics columns · 3fdeb189
      Tom Lane authored
      (relpages/reltuples).  To do this, create formal support in heapam.c for
      "overwrite" tuple updates (including xlog replay capability) and use that
      instead of the ad-hoc overwrites we'd been using in VACUUM and CREATE INDEX.
      Take the responsibility for updating stats during CREATE INDEX out of the
      individual index AMs, and do it where it belongs, in catalog/index.c.  Aside
      from being more modular, this avoids having to update the same tuple twice in
      some paths through CREATE INDEX.  It's probably not measurably faster, but
      for sure it's a lot cleaner than before.
      3fdeb189
  5. 04 Apr, 2006 1 commit
    • Tom Lane's avatar
      Modify all callers of datatype input and receive functions so that if these · 147d4bf3
      Tom Lane authored
      functions are not strict, they will be called (passing a NULL first parameter)
      during any attempt to input a NULL value of their datatype.  Currently, all
      our input functions are strict and so this commit does not change any
      behavior.  However, this will make it possible to build domain input functions
      that centralize checking of domain constraints, thereby closing numerous holes
      in our domain support, as per previous discussion.
      
      While at it, I took the opportunity to introduce convenience functions
      InputFunctionCall, OutputFunctionCall, etc to use in code that calls I/O
      functions.  This eliminates a lot of grotty-looking casts, but the main
      motivation is to make it easier to grep for these places if we ever need
      to touch them again.
      147d4bf3
  6. 07 Mar, 2006 1 commit
  7. 05 Mar, 2006 1 commit
  8. 05 Jan, 2006 1 commit
  9. 04 Jan, 2006 1 commit
  10. 22 Nov, 2005 1 commit
  11. 20 Oct, 2005 1 commit
  12. 15 Oct, 2005 1 commit
  13. 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
  14. 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
  15. 06 May, 2005 1 commit
  16. 01 May, 2005 1 commit
    • Tom Lane's avatar
      Change CREATE TYPE to require datatype output and send functions to have · 6c412f06
      Tom Lane authored
      only one argument.  (Per recent discussion, the option to accept multiple
      arguments is pretty useless for user-defined types, and would be a likely
      source of security holes if it was used.)  Simplify call sites of
      output/send functions to not bother passing more than one argument.
      6c412f06
  17. 14 Apr, 2005 1 commit
  18. 29 Mar, 2005 2 commits
    • Tom Lane's avatar
      Add proallargtypes and proargmodes columns to pg_proc, as per my earlier · 0f085f6e
      Tom Lane authored
      proposal for OUT parameter support.  The columns don't actually *do*
      anything yet, they are just left NULLs.  But I thought I'd commit this
      part separately as a fairly pure example of the tasks needed when adding
      a column to pg_proc or one of the other core system tables.
      0f085f6e
    • Tom Lane's avatar
      Convert oidvector and int2vector into variable-length arrays. This · 70c9763d
      Tom Lane authored
      change saves a great deal of space in pg_proc and its primary index,
      and it eliminates the former requirement that INDEX_MAX_KEYS and
      FUNC_MAX_ARGS have the same value.  INDEX_MAX_KEYS is still embedded
      in the on-disk representation (because it affects index tuple header
      size), but FUNC_MAX_ARGS is not.  I believe it would now be possible
      to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet.
      There are still a lot of vestigial references to FUNC_MAX_ARGS, which
      I will clean up in a separate pass.  However, getting rid of it
      altogether would require changing the FunctionCallInfoData struct,
      and I'm not sure I want to buy into that.
      70c9763d
  19. 20 Feb, 2005 1 commit
    • Tom Lane's avatar
      Add code to prevent transaction ID wraparound by enforcing a safe limit · 60b2444c
      Tom Lane authored
      in GetNewTransactionId().  Since the limit value has to be computed
      before we run any real transactions, this requires adding code to database
      startup to scan pg_database and determine the oldest datfrozenxid.
      This can conveniently be combined with the first stage of an attack on
      the problem that the 'flat file' copies of pg_shadow and pg_group are
      not properly updated during WAL recovery.  The code I've added to
      startup resides in a new file src/backend/utils/init/flatfiles.c, and
      it is responsible for rewriting the flat files as well as initializing
      the XID wraparound limit value.  This will eventually allow us to get
      rid of GetRawDatabaseInfo too, but we'll need an initdb so we can add
      a trigger to pg_database.
      60b2444c
  20. 14 Jan, 2005 1 commit
  21. 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
  22. 14 Nov, 2004 1 commit
  23. 10 Oct, 2004 1 commit
    • Neil Conway's avatar
      Cosmetic improvements/code cleanup: · 0e72b9d4
      Neil Conway authored
      - replace some function signatures of the form "some_type foo()" with
      "some_type foo(void)"
      - replace a few instances of a literal 0 being used as a NULL pointer;
      there are more instances of this in the code, but I just fixed a few
      - in src/backend/utils/mb/wstrncmp.c, replace K&R style function
      declarations with ANSI style, remove use of 'register' keyword
      - remove an "extern" modifier that was applied to a function definition
      (rather than a declaration)
      0e72b9d4
  24. 08 Oct, 2004 1 commit
  25. 29 Aug, 2004 2 commits
  26. 31 Jul, 2004 2 commits
  27. 21 Jul, 2004 2 commits
  28. 17 Jul, 2004 1 commit
    • Tom Lane's avatar
      Invent ResourceOwner mechanism as per my recent proposal, and use it to · fe548629
      Tom Lane authored
      keep track of portal-related resources separately from transaction-related
      resources.  This allows cursors to work in a somewhat sane fashion with
      nested transactions.  For now, cursor behavior is non-subtransactional,
      that is a cursor's state does not roll back if you abort a subtransaction
      that fetched from the cursor.  We might want to change that later.
      fe548629
  29. 11 Jul, 2004 1 commit
  30. 24 Jun, 2004 1 commit
  31. 06 Jun, 2004 1 commit
    • Tom Lane's avatar
      Infrastructure for I/O of composite types: arrange for the I/O routines · c541bb86
      Tom Lane authored
      of a composite type to get that type's OID as their second parameter,
      in place of typelem which is useless.  The actual changes are mostly
      centralized in getTypeInputInfo and siblings, but I had to fix a few
      places that were fetching pg_type.typelem for themselves instead of
      using the lsyscache.c routines.  Also, I renamed all the related variables
      from 'typelem' to 'typioparam' to discourage people from assuming that
      they necessarily contain array element types.
      c541bb86
  32. 03 Jun, 2004 1 commit
    • Tom Lane's avatar
      Adjust our timezone library to use pg_time_t (typedef'd as int64) in · 921d749b
      Tom Lane authored
      place of time_t, as per prior discussion.  The behavior does not change
      on machines without a 64-bit-int type, but on machines with one, which
      is most, we are rid of the bizarre boundary behavior at the edges of
      the 32-bit-time_t range (1901 and 2038).  The system will now treat
      times over the full supported timestamp range as being in your local
      time zone.  It may seem a little bizarre to consider that times in
      4000 BC are PST or EST, but this is surely at least as reasonable as
      propagating Gregorian calendar rules back that far.
      
      I did not modify the format of the zic timezone database files, which
      means that for the moment the system will not know about daylight-savings
      periods outside the range 1901-2038.  Given the way the files are set up,
      it's not a simple decision like 'widen to 64 bits'; we have to actually
      think about the range of years that need to be supported.  We should
      probably inquire what the plans of the upstream zic people are before
      making any decisions of our own.
      921d749b
  33. 29 May, 2004 1 commit
    • Tom Lane's avatar
      Separate out bgwriter code into a logically separate module, rather · 076a055a
      Tom Lane authored
      than being random pieces of other files.  Give bgwriter responsibility
      for all checkpoint activity (other than a post-recovery checkpoint);
      so this child process absorbs the functionality of the former transient
      checkpoint and shutdown subprocesses.  While at it, create an actual
      include file for postmaster.c, which for some reason never had its own
      file before.
      076a055a
  34. 28 May, 2004 1 commit
    • Tom Lane's avatar
      Code review for EXEC_BACKEND changes. Reduce the number of #ifdefs by · 1a321f26
      Tom Lane authored
      about a third, make it work on non-Windows platforms again.  (But perhaps
      I broke the WIN32 code, since I have no way to test that.)  Fold all the
      paths that fork postmaster child processes to go through the single
      routine SubPostmasterMain, which takes care of resurrecting the state that
      would normally be inherited from the postmaster (including GUC variables).
      Clean up some places where there's no particularly good reason for the
      EXEC and non-EXEC cases to work differently.  Take care of one or two
      FIXMEs that remained in the code.
      1a321f26
  35. 27 May, 2004 1 commit
    • Tom Lane's avatar
      Get rid of the former rather baroque mechanism for propagating the values · 16974ee9
      Tom Lane authored
      of ThisStartUpID and RedoRecPtr into new backends.  It's a lot easier just
      to make them all grab the values out of shared memory during startup.
      This helps to decouple the postmaster from checkpoint execution, which I
      need since I'm intending to let the bgwriter do it instead, and it also
      fixes a bug in the Win32 port: ThisStartUpID wasn't getting propagated at
      all AFAICS.  (Doesn't give me a lot of faith in the amount of testing that
      port has gotten.)
      16974ee9
  36. 21 May, 2004 1 commit