postgresql/src/backend
Tom Lane 1ddc2703a9 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.
2010-02-07 22:40:33 +00:00
..
access Create a "relation mapping" infrastructure to support changing the relfilenodes 2010-02-07 20:48:13 +00:00
bootstrap Create a "relation mapping" infrastructure to support changing the relfilenodes 2010-02-07 20:48:13 +00:00
catalog Work around deadlock problems with VACUUM FULL/CLUSTER on system catalogs, 2010-02-07 22:40:33 +00:00
commands Work around deadlock problems with VACUUM FULL/CLUSTER on system catalogs, 2010-02-07 22:40:33 +00:00
executor Create a "relation mapping" infrastructure to support changing the relfilenodes 2010-02-07 20:48:13 +00:00
foreign Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
lib Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
libpq Make RADIUS authentication use pg_getaddrinfo_all() to get address of 2010-02-02 19:09:37 +00:00
main Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
nodes Type table feature 2010-01-28 23:21:13 +00:00
optimizer Tighten integrity checks on ALTER TABLE ... ALTER COLUMN ... RENAME. 2010-02-01 19:28:56 +00:00
parser Create a "relation mapping" infrastructure to support changing the relfilenodes 2010-02-07 20:48:13 +00:00
po Translation updates 2009-12-19 20:23:26 +00:00
port Fix race condition in win32 signal handling. 2010-01-31 17:16:23 +00:00
postmaster Document that archive_timeout will force new WAL files even if a single 2010-02-05 23:37:43 +00:00
regex Change regexp engine's ccondissect/crevdissect routines to perform DFA 2010-02-01 02:45:29 +00:00
replication Add a message type header to the CopyData messages sent from primary 2010-02-03 09:47:19 +00:00
rewrite Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
snowball Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
storage Assorted cleanups in preparation for using a map file to support altering 2010-02-03 01:14:17 +00:00
tcop Avoid performing encoding conversion on command tag strings during EndCommand. 2010-01-30 20:09:53 +00:00
tsearch When estimating the selectivity of an inequality "column > constant" or 2010-01-04 02:44:40 +00:00
utils Looks like we need #include <sys/stat.h> here on some 2010-02-07 22:00:53 +00:00
Makefile Well, the systemtap guys moved the goalposts again: with the latest version, 2010-01-20 23:12:03 +00:00
common.mk Expand test coverage support to entire tree 2009-08-07 20:50:22 +00:00
nls.mk Convert the core lexer and parser into fully reentrant code, by making use 2009-07-13 02:02:20 +00:00