postgresql/src
Robert Haas 503c7305a1 Make the visibility map crash-safe.
This involves two main changes from the previous behavior.  First,
when we set a bit in the visibility map, emit a new WAL record of type
XLOG_HEAP2_VISIBLE.  Replay sets the page-level PD_ALL_VISIBLE bit and
the visibility map bit.  Second, when inserting, updating, or deleting
a tuple, we can no longer get away with clearing the visibility map
bit after releasing the lock on the corresponding heap page, because
an intervening crash might leave the visibility map bit set and the
page-level bit clear.  Making this work requires a bit of interface
refactoring.

In passing, a few minor but related cleanups: change the test in
visibilitymap_set and visibilitymap_clear to throw an error if the
wrong page (or no page) is pinned, rather than silently doing nothing;
this case should never occur.  Also, remove duplicate definitions of
InvalidXLogRecPtr.

Patch by me, review by Noah Misch.
2011-06-21 23:04:40 -04:00
..
backend Make the visibility map crash-safe. 2011-06-21 23:04:40 -04:00
bin Obtain table locks as soon as practical during pg_dump. 2011-06-17 18:19:02 -04:00
include Make the visibility map crash-safe. 2011-06-21 23:04:40 -04:00
interfaces Capitalization fixes 2011-06-19 00:37:30 +03:00
makefiles Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
pl Translation updates for 9.1beta2 2011-06-09 23:02:48 +03:00
port Stamp HEAD as 9.2devel. 2011-06-11 17:46:49 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Add some regression tests for serial pseudotypes. 2011-06-21 22:57:08 -04:00
timezone Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
tools Add REL9_1_STABLE to the set of branches tracked by git_changelog. 2011-06-19 14:16:41 -04:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02: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 Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00