postgresql/src
Heikki Linnakangas 5bdf02cd29 Fix spurious warning after vacuuming a page on a table with no indexes.
There is a rare race condition, when a transaction that inserted a tuple
aborts while vacuum is processing the page containing the inserted tuple.
Vacuum prunes the page first, which normally removes any dead tuples, but
if the inserting transaction aborts right after that, the loop after
pruning will see a dead tuple and remove it instead. That's OK, but if the
page is on a table with no indexes, and the page becomes completely empty
after removing the dead tuple (or tuples) on it, it will be immediately
marked as all-visible. That's OK, but the sanity check in vacuum would
throw a warning because it thinks that the page contains dead tuples and
was nevertheless marked as all-visible, even though it just vacuumed away
the dead tuples and so it doesn't actually contain any.

Spotted this while reading the code. It's difficult to hit the race
condition otherwise, but can be done by putting a breakpoint after the
heap_page_prune() call.

Backpatch all the way to 8.4, where this code first appeared.
2013-09-26 11:38:15 +03:00
..
backend Fix spurious warning after vacuuming a page on a table with no indexes. 2013-09-26 11:38:15 +03:00
bin Fix two timeline handling bugs in pg_receivexlog. 2013-09-23 10:40:25 +03:00
common pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
include Rename various "freeze multixact" variables 2013-09-16 15:56:11 -03:00
interfaces Fix SSL deadlock risk in libpq 2013-09-23 08:42:37 -04:00
makefiles Blind attempt at fixing the non-MSVC Windows builds 2013-02-22 11:51:15 -03:00
pl Translation updates 2013-09-02 02:28:21 -04:00
port Use SA_RESTART for all signals, including SIGALRM. 2013-06-15 15:40:05 -04:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Use @libdir@ in both of regress/{input,output}/security_label.source 2013-09-23 16:00:47 -04:00
timezone Update time zone data files to tzdata release 2013d. 2013-09-02 15:06:30 -04:00
tools Minor spelling fixes 2013-06-01 10:18:59 -04:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Remove whitespace from end of lines 2013-05-30 21:05:07 -04:00
Makefile.shlib Add pkg-config files for libpq and ecpg libraries 2013-03-31 16:58:40 -04:00
nls-global.mk NLS: Use msgmerge --previous option 2012-12-13 23:12:12 -05:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00