postgresql/src/backend
Tom Lane c00dc337b8 Fix potential corruption of lock table in CREATE/DROP INDEX CONCURRENTLY.
If VirtualXactLock() has to wait for a transaction that holds its VXID lock
as a fast-path lock, it must first convert the fast-path lock to a regular
lock.  It failed to take the required "partition" lock on the main
shared-memory lock table while doing so.  This is the direct cause of the
assert failure in GetLockStatusData() recently observed in the buildfarm,
but more worryingly it could result in arbitrary corruption of the shared
lock table if some other process were concurrently engaged in modifying the
same partition of the lock table.  Fortunately, VirtualXactLock() is only
used by CREATE INDEX CONCURRENTLY and DROP INDEX CONCURRENTLY, so the
opportunities for failure are fewer than they might have been.

In passing, improve some comments and be a bit more consistent about
order of operations.
2013-01-08 18:25:58 -05:00
..
access Tolerate timeline switches while "pg_basebackup -X fetch" is running. 2013-01-03 19:51:00 +02:00
bootstrap Fix IsUnderPostmaster/EXEC_BACKEND confusion 2013-01-02 18:39:20 -03:00
catalog Update copyrights for 2013 2013-01-01 17:15:01 -05:00
commands Fix incorrect error message when schema-CREATE permission is absent. 2013-01-07 11:54:59 -05:00
executor Invent a "one-shot" variant of CachedPlans for better performance. 2013-01-04 17:42:19 -05:00
foreign Update copyrights for 2013 2013-01-01 17:15:01 -05:00
lib Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq Update copyrights for 2013 2013-01-01 17:15:01 -05:00
main Update copyrights for 2013 2013-01-01 17:15:01 -05:00
nodes Update copyrights for 2013 2013-01-01 17:15:01 -05:00
optimizer Update copyrights for 2013 2013-01-01 17:15:01 -05:00
parser Make some spelling more consistent 2013-01-05 08:25:21 -05:00
po Translation updates 2011-08-17 14:07:46 +03:00
port Update copyrights for 2013 2013-01-01 17:15:01 -05:00
postmaster Make sure MaxBackends is always set 2013-01-02 14:39:11 -03:00
regex Update copyrights for 2013 2013-01-01 17:15:01 -05:00
replication Tolerate timeline switches while "pg_basebackup -X fetch" is running. 2013-01-03 19:51:00 +02:00
rewrite Update copyrights for 2013 2013-01-01 17:15:01 -05:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Fix potential corruption of lock table in CREATE/DROP INDEX CONCURRENTLY. 2013-01-08 18:25:58 -05:00
tcop Fix IsUnderPostmaster/EXEC_BACKEND confusion 2013-01-02 18:39:20 -03:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Make some spelling more consistent 2013-01-05 08:25:21 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyrights for 2013 2013-01-01 17:15:01 -05:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
nls.mk Sort file list when creating gettext-files 2011-12-27 20:20:56 +02:00