postgresql/src
Tom Lane 735d88e60e Remove special case for xmin == xmax in HeapTupleSatisfiesVacuum().
VACUUM was willing to remove a committed-dead tuple immediately if it was
deleted by the same transaction that inserted it.  The idea is that such a
tuple could never have been visible to any other transaction, so we don't
need to keep it around to satisfy MVCC snapshots.  However, there was
already an exception for tuples that are part of an update chain, and this
exception created a problem: we might remove TOAST tuples (which are never
part of an update chain) while their parent tuple stayed around (if it was
part of an update chain).  This didn't pose a problem for most things,
since the parent tuple is indeed dead: no snapshot will ever consider it
visible.  But MVCC-safe CLUSTER had a problem, since it will try to copy
RECENTLY_DEAD tuples to the new table.  It then has to copy their TOAST
data too, and would fail if VACUUM had already removed the toast tuples.

Easiest fix is to get rid of the special case for xmin == xmax.  This may
delay reclaiming dead space for a little bit in some cases, but it's by far
the most reliable way to fix the issue.

Per bug #5998 from Mark Reid.  Back-patch to 8.3, which is the oldest
version with MVCC-safe CLUSTER.
2011-04-29 16:30:02 -04:00
..
backend Remove special case for xmin == xmax in HeapTupleSatisfiesVacuum(). 2011-04-29 16:30:02 -04:00
bin Fix SortTocFromFile() to cope with lines that are too long for its buffer. 2011-04-07 11:40:39 -04:00
include Avoid changing an index's indcheckxmin horizon during REINDEX. 2011-04-19 18:51:12 -04:00
interfaces Tag 8.3.15. 2011-04-15 00:18:15 -03:00
makefiles Teach pgxs.mk and Install.pm how to install files from a contrib module 2007-10-16 16:00:00 +00:00
pl Fix PL/Python memory leak involving array slices 2011-03-17 12:49:38 -03:00
port Tag 8.3.15. 2011-04-15 00:18:15 -03:00
template Use SYSV semaphores rather than POSIX on Darwin >= 6.0 (i.e., OS X 10.2 2007-09-26 00:32:46 +00:00
test Prevent a rowtype from being included in itself. 2011-03-28 15:45:14 -04:00
timezone Update time zone data files to tzdata release 2011f. 2011-04-13 18:05:09 -04:00
tools Avoid use of mixed slash style paths in arguments to xcopy in MSVC builds. 2011-04-07 22:16:16 -04:00
tutorial Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:12 +02:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Testing commit stuff 2006-07-10 15:50:02 +00:00
Makefile Tsearch2 functionality migrates to core. The bulk of this work is by 2007-08-21 01:11:32 +00:00
Makefile.global.in I find that an out-of-the-box installation of OSSP uuid 1.6.0 installs 2007-11-13 00:13:19 +00:00
Makefile.shlib Change $(CC) to $(COMPILER) on Solaris gcc so -m64 is passed into the 2007-02-20 22:45:57 +00:00
nls-global.mk When merging PO files, take into consideration translations in other PO 2006-04-05 13:40:15 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00