Skip to content
Snippets Groups Projects
  1. Apr 07, 2006
    • Andrew Dunstan's avatar
      · 39ec43a2
      Andrew Dunstan authored
      Revert getaddrinfo configure changes until we get a solution that is
      properly tested on Tru64 - pre recent discussion (or lack thereof) on -hackers.
      39ec43a2
    • Tom Lane's avatar
      Fix make_restrictinfo_from_bitmapqual() to preserve AND/OR flatness of its · 2f8a7bf2
      Tom Lane authored
      output, ie, no OR immediately below an OR.  Otherwise we get Asserts or
      wrong answers for cases such as
      	select * from tenk1 a, tenk1 b
      	where (a.ten = b.ten and (a.unique1 = 100 or a.unique1 = 101))
      	   or (a.hundred = b.hundred and a.unique1 = 42);
      Per report from Rafael Martinez Guerrero.
      2f8a7bf2
  2. Apr 06, 2006
  3. Apr 05, 2006
  4. Apr 04, 2006
    • 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
    • Tom Lane's avatar
      Define a separately configurable XLOG_BLCKSZ symbol for the page size · eaef1113
      Tom Lane authored
      used within WAL files.  Historically this was the same as the data file
      BLCKSZ, but there's no necessary connection, and it's possible that
      performance gains might ensue from reducing XLOG_BLCKSZ.  In any case
      distinguishing two symbols should improve code clarity.  This commit
      does not actually change the page size, only provide the infrastructure
      to make it possible to do so.  initdb forced because of addition of a
      field to pg_control.
      Mark Wong, with some help from Simon Riggs and Tom Lane.
      eaef1113
  5. Apr 03, 2006
  6. Apr 02, 2006
  7. Apr 01, 2006
    • Tom Lane's avatar
      Remove the 'slow' path for btree index build, which built the btree · 89bda95d
      Tom Lane authored
      incrementally by successive inserts rather than by sorting the data.
      We were only using the slow path during bootstrap, apparently because
      when first written it failed during bootstrap --- but it works fine now
      AFAICT.  Removing it saves a hundred or so lines of code and produces
      noticeably (~10%) smaller initial states of the system catalog indexes.
      While that won't make much difference for heavily-modified catalogs,
      for the more static ones there may be a useful long-term performance
      improvement.
      89bda95d
    • Tom Lane's avatar
      Clean up WAL/buffer interactions as per my recent proposal. Get rid of the · a8b8f4db
      Tom Lane authored
      misleadingly-named WriteBuffer routine, and instead require routines that
      change buffer pages to call MarkBufferDirty (which does exactly what it says).
      We also require that they do so before calling XLogInsert; this takes care of
      the synchronization requirement documented in SyncOneBuffer.  Note that
      because bufmgr takes the buffer content lock (in shared mode) while writing
      out any buffer, it doesn't matter whether MarkBufferDirty is executed before
      the buffer content change is complete, so long as the content change is
      completed before releasing exclusive lock on the buffer.  So it's OK to set
      the dirtybit before we fill in the LSN.
      This eliminates the former kluge of needing to set the dirtybit in LockBuffer.
      Aside from making the code more transparent, we can also add some new
      debugging assertions, in particular that the caller of MarkBufferDirty must
      hold the buffer content lock, not merely a pin.
      a8b8f4db
  8. Mar 31, 2006
    • Tom Lane's avatar
      Improve gist XLOG code to follow the coding rules needed to prevent · 89395bfa
      Tom Lane authored
      torn-page problems.  This introduces some issues of its own, mainly
      that there are now some critical sections of unreasonably broad scope,
      but it's a step forward anyway.  Further cleanup will require some
      code refactoring that I'd prefer to get Oleg and Teodor involved in.
      89395bfa
    • Tom Lane's avatar
      Suppress attempts to report dropped tables to the stats collector from a · 4243f238
      Tom Lane authored
      startup or recovery process.  Since such a process isn't a real backend,
      pgstat.c gets confused.  This accounts for recent reports of strange
      "invalid server process ID -1" log messages during crash recovery.
      There isn't any point in attempting to make the report, since we'll discard
      stats in such scenarios anyhow.
      4243f238
  9. Mar 30, 2006
  10. Mar 29, 2006
  11. Mar 28, 2006
  12. Mar 25, 2006
    • Tom Lane's avatar
      Comments in IndexBuildHeapScan describe the indexing of recently-dead · 4e7d10c7
      Tom Lane authored
      tuples as needed "to keep VACUUM from complaining", but actually there is
      a more compelling reason to do it: failure to do so violates MVCC semantics.
      This is because a pre-existing serializable transaction might try to use
      the index after we finish (re)building it, and it might fail to find tuples
      it should be able to see.  We got this mostly right, but not in the case
      of partial indexes: the code mistakenly discarded recently-dead tuples for
      partial indexes.  Fix that, and adjust the comments.
      4e7d10c7
  13. Mar 24, 2006
  14. Mar 23, 2006
  15. Mar 21, 2006
    • Tom Lane's avatar
      Improve performance of our private version of qsort. Per recent testing, · a3f0b3d6
      Tom Lane authored
      the logic it contained to switch to insertion sort for near-sorted input was
      in fact a big loss, because it could fairly easily be fooled into applying
      insertion sort to large subfiles that weren't all that well ordered.  Remove
      that, and instead add a simple check for already-perfectly-sorted input, as
      per suggestion from Dann Corbit.  This adds at worst O(N*lgN) overhead, and
      usually far less, while sometimes allowing a subfile sort to finish in O(N)
      time.  Preliminary testing says this is an improvement over the basic
      Bentley & McIlroy code for many nonrandom inputs, and it costs almost
      nothing when the input is random.
      a3f0b3d6
Loading