diff options
| author | Tom Lane | 2010-02-07 22:40:33 +0000 |
|---|---|---|
| committer | Tom Lane | 2010-02-07 22:40:33 +0000 |
| commit | 1ddc2703a936d03953657f43345460b9242bbed1 (patch) | |
| tree | b55bc003326fc288643f2cd7e30bf9c056a54ca3 /src/test | |
| parent | 1c05b0b4ea05fc73ea3612212c943cd459efa17d (diff) | |
Work around deadlock problems with VACUUM FULL/CLUSTER on system catalogs,
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.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/parallel_schedule | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule index eb53eff4b44..43794122f56 100644 --- a/src/test/regress/parallel_schedule +++ b/src/test/regress/parallel_schedule @@ -1,5 +1,5 @@ # ---------- -# $PostgreSQL: pgsql/src/test/regress/parallel_schedule,v 1.59 2010/02/07 20:48:13 tgl Exp $ +# $PostgreSQL: pgsql/src/test/regress/parallel_schedule,v 1.60 2010/02/07 22:40:33 tgl Exp $ # # By convention, we put no more than twenty tests in any one parallel group; # this limits the number of connections needed to run the tests. @@ -52,10 +52,7 @@ test: copy copyselect # ---------- # Another group of parallel tests # ---------- -test: constraints triggers create_misc create_aggregate create_operator inherit typed_table drop_if_exists create_cast - -# XXX temporarily run this by itself -test: vacuum +test: constraints triggers create_misc create_aggregate create_operator inherit typed_table vacuum drop_if_exists create_cast # Depends on the above test: create_index create_view |
