1. 07 Feb, 2010 3 commits
    • Tom Lane's avatar
      Work around deadlock problems with VACUUM FULL/CLUSTER on system catalogs, · 1ddc2703
      Tom Lane authored
      as per my recent proposal.
      
      First, teach IndexBuildHeapScan to not wait for INSERT_IN_PROGRESS or
      DELETE_IN_PROGRESS tuples to commit unless the index build is checking
      uniqueness/exclusion constraints.  If it isn't, there's no harm in just
      indexing the in-doubt tuple.
      
      Second, modify VACUUM FULL/CLUSTER to suppress reverifying
      uniqueness/exclusion constraint properties while rebuilding indexes of
      the target relation.  This is reasonable because these commands aren't
      meant to deal with corrupted-data situations.  Constraint properties
      will still be rechecked when an index is rebuilt by a REINDEX command.
      
      This gets us out of the problem that new-style VACUUM FULL would often
      wait for other transactions while holding exclusive lock on a system
      catalog, leading to probable deadlock because those other transactions
      need to look at the catalogs too.  Although the real ultimate cause of
      the problem is a debatable choice to release locks early after modifying
      system catalogs, changing that choice would require pretty serious
      analysis and is not something to be undertaken lightly or on a tight
      schedule.  The present patch fixes the problem in a fairly reasonable
      way and should also improve the speed of VACUUM FULL/CLUSTER a little bit.
      1ddc2703
    • Tom Lane's avatar
      Looks like we need #include <sys/stat.h> here on some · 1c05b0b4
      Tom Lane authored
      platforms.  Per buildfarm.
      1c05b0b4
    • Tom Lane's avatar
      Create a "relation mapping" infrastructure to support changing the relfilenodes · b9b8831a
      Tom Lane authored
      of shared or nailed system catalogs.  This has two key benefits:
      
      * The new CLUSTER-based VACUUM FULL can be applied safely to all catalogs.
      
      * We no longer have to use an unsafe reindex-in-place approach for reindexing
        shared catalogs.
      
      CLUSTER on nailed catalogs now works too, although I left it disabled on
      shared catalogs because the resulting pg_index.indisclustered update would
      only be visible in one database.
      
      Since reindexing shared system catalogs is now fully transactional and
      crash-safe, the former special cases in REINDEX behavior have been removed;
      shared catalogs are treated the same as non-shared.
      
      This commit does not do anything about the recently-discussed problem of
      deadlocks between VACUUM FULL/CLUSTER on a system catalog and other
      concurrent queries; will address that in a separate patch.  As a stopgap,
      parallel_schedule has been tweaked to run vacuum.sql by itself, to avoid
      such failures during the regression tests.
      b9b8831a
  2. 06 Feb, 2010 1 commit
  3. 05 Feb, 2010 12 commits
  4. 04 Feb, 2010 4 commits
  5. 03 Feb, 2010 10 commits
  6. 02 Feb, 2010 7 commits
  7. 01 Feb, 2010 3 commits
    • Robert Haas's avatar
      Tighten integrity checks on ALTER TABLE ... ALTER COLUMN ... RENAME. · 63f9282f
      Robert Haas authored
      When a column is renamed, we recursively rename the same column in
      all descendent tables.  But if one of those tables also inherits that
      column from a table outside the inheritance hierarchy rooted at the
      named table, we must throw an error.  The previous coding correctly
      prohibited the rename when the parent had inherited the column from
      elsewhere, but overlooked the case where the parent was OK but a child
      table also inherited the same column from a second, unrelated parent.
      
      For now, not backpatched due to lack of complaints from the field.
      
      KaiGai Kohei, with further changes by me.
      Reviewed by Bernd Helme and Tom Lane.
      63f9282f
    • Bruce Momjian's avatar
      Remove tabs in sgml. · 1526d4e3
      Bruce Momjian authored
      1526d4e3
    • Robert Haas's avatar
      Augment EXPLAIN output with more details on Hash nodes. · 42a8ab0a
      Robert Haas authored
      We show the number of buckets, the number of batches (and also the original
      number if it has changed), and the peak space used by the hash table.  Minor
      executor changes to track peak space used.
      42a8ab0a