postgresql/src
Heikki Linnakangas 95aa823eb6 Set the all-visible flag on heap page before writing WAL record, not after.
If we set the all-visible flag after writing WAL record, and XLogInsert
takes a full-page image of the page, the image would not include the flag.
We will then proceed to set the VM bit, which would then be set without the
corresponding all-visible flag on the heap page.

Found by comparing page images on master and standby, after writing/replaying
each WAL record. (There is still a discrepancy: the all-visible flag won't
be set after replaying the HEAP_CLEAN record, even though it is set in the
master. However, it will be set when replaying the HEAP2_VISIBLE record and
setting the VM bit, so the all-visible flag and VM bit are always consistent
on the standby, even though they are momentarily out-of-sync with master)

Backpatch to 9.3 where this code was introduced.
2014-04-17 17:47:58 +03:00
..
backend Set the all-visible flag on heap page before writing WAL record, not after. 2014-04-17 17:47:58 +03:00
bin Use AF_UNSPEC not PF_UNSPEC in getaddrinfo calls. 2014-04-16 13:21:26 -04:00
common pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
include Fix non-equivalence of VARIADIC and non-VARIADIC function call formats. 2014-04-03 22:02:27 -04:00
interfaces Fix timeout in LDAP lookup of libpq connection parameters 2014-04-16 18:58:55 +02:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:13:32 -05:00
pl Fix refcounting bug in PLy_modify_tuple(). 2014-03-26 16:41:35 -04:00
port Fix assorted issues in client host name lookup. 2014-04-02 17:11:27 -04:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Revert "Secure Unix-domain sockets of "make check" temporary clusters." 2014-03-29 03:14:48 -04:00
timezone Update time zone data files to tzdata release 2014a. 2014-03-15 13:36:24 -04:00
tools Attempt to get plpython regression tests working again for MSVC builds. 2014-04-16 13:43:32 -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 Revert "Backpatch pgxs vpath build and installation fixes." 2013-10-07 22:32:04 -04:00
Makefile.shlib fix whitespace 2014-02-01 16:30:22 -05: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