1. 24 Aug, 2009 2 commits
    • Tom Lane's avatar
      Run the "tablespace" regression test first not last. The former placement · 3bee0a46
      Tom Lane authored
      renders useless one of the few test methodologies we have for WAL replay,
      which is to intentionally crash the system just after completing the
      regression tests and see if it recovers to the expected database state.
      The reason is that DROP TABLESPACE forces a checkpoint, so there's essentially
      no WAL available for replay after the tests complete.
      3bee0a46
    • Tom Lane's avatar
      Fix a violation of WAL coding rules in the recent patch to include an · 7fc7a7c4
      Tom Lane authored
      "all tuples visible" flag in heap page headers.  The flag update *must*
      be applied before calling XLogInsert, but heap_update and the tuple
      moving routines in VACUUM FULL were ignoring this rule.  A crash and
      replay could therefore leave the flag incorrectly set, causing rows
      to appear visible in seqscans when they should not be.  This might explain
      recent reports of data corruption from Jeff Ross and others.
      
      In passing, do a bit of editorialization on comments in visibilitymap.c.
      7fc7a7c4
  2. 23 Aug, 2009 2 commits
    • Tom Lane's avatar
      Make TRUNCATE do truncate-in-place when processing a relation that was created · cab9a065
      Tom Lane authored
      or previously truncated in the current (sub)transaction.  This is safe since
      if the (sub)transaction later rolls back, we'd just discard the rel's current
      physical file anyway.  This avoids unreasonable growth in the number of
      transient files when a relation is repeatedly truncated.  Per a performance
      gripe a couple weeks ago from Todd Cook.
      cab9a065
    • Tom Lane's avatar
      Tweak ExecIndexEvalRuntimeKeys to forcibly detoast any toasted comparison · c38b7594
      Tom Lane authored
      values before they get passed to the index access method.  This avoids
      repeated detoastings that will otherwise ensue as the comparison value
      is examined by various index support functions.  We have seen a couple of
      reports of cases where repeated detoastings result in an order-of-magnitude
      slowdown, so it seems worth adding a bit of extra logic to prevent this.
      
      I had previously proposed trying to avoid duplicate detoastings in general,
      but this fix takes care of what seems the most important case in practice
      with very little effort or risk.
      
      Back-patch to 8.4 so that the PostGIS folk won't have to wait a year to
      have this fix in a production release.  (The issue exists further back,
      of course, but the code's diverged enough to make backpatching further a
      higher-risk action.  Also it appears that the possible gains may be limited
      in prior releases because of different handling of lossy operators.)
      c38b7594
  3. 22 Aug, 2009 1 commit
  4. 20 Aug, 2009 1 commit
  5. 19 Aug, 2009 3 commits
  6. 18 Aug, 2009 10 commits
  7. 17 Aug, 2009 3 commits
  8. 16 Aug, 2009 2 commits
  9. 15 Aug, 2009 3 commits
  10. 14 Aug, 2009 7 commits
  11. 13 Aug, 2009 4 commits
  12. 12 Aug, 2009 2 commits