1. 08 2月, 2010 4 次提交
    • T
      Remove old-style VACUUM FULL (which was known for a little while as · 0a469c87
      Tom Lane 提交于
      VACUUM FULL INPLACE), along with a boatload of subsidiary code and complexity.
      Per discussion, the use case for this method of vacuuming is no longer large
      enough to justify maintaining it; not to mention that we don't wish to invest
      the work that would be needed to make it play nicely with Hot Standby.
      
      Aside from the code directly related to old-style VACUUM FULL, this commit
      removes support for certain WAL record types that could only be generated
      within VACUUM FULL, redirect-pointer removal in heap_page_prune, and
      nontransactional generation of cache invalidation sinval messages (the last
      being the sticking point for Hot Standby).
      
      We still have to retain all code that copes with finding HEAP_MOVED_OFF and
      HEAP_MOVED_IN flag bits on existing tuples.  This can't be removed as long
      as we want to support in-place update from pre-9.0 databases.
      0a469c87
    • T
      Work around deadlock problems with VACUUM FULL/CLUSTER on system catalogs, · 1ddc2703
      Tom Lane 提交于
      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
    • T
      Looks like we need #include <sys/stat.h> here on some · 1c05b0b4
      Tom Lane 提交于
      platforms.  Per buildfarm.
      1c05b0b4
    • T
      Create a "relation mapping" infrastructure to support changing the relfilenodes · b9b8831a
      Tom Lane 提交于
      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 2月, 2010 8 次提交
  3. 05 2月, 2010 5 次提交
  4. 04 2月, 2010 7 次提交
  5. 03 2月, 2010 14 次提交
  6. 02 2月, 2010 1 次提交
    • R
      Tighten integrity checks on ALTER TABLE ... ALTER COLUMN ... RENAME. · 63f9282f
      Robert Haas 提交于
      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
  7. 01 2月, 2010 1 次提交