postgresql/src
Heikki Linnakangas e2bccdfccd In WAL replay, restore GIN metapage unconditionally to avoid torn page.
We don't take a full-page image of the GIN metapage; instead, the WAL record
contains all the information required to reconstruct it from scratch. But
to avoid torn page hazards, we must re-initialize it from the WAL record
every time, even if it already has a greater LSN, similar to how normal full
page images are restored.

This was highly unlikely to cause any problems in practice, because the GIN
metapage is small. We rely on an update smaller than a 512 byte disk sector
to be atomic elsewhere, at least in pg_control. But better safe than sorry,
and this would be easy to overlook if more fields are added to the metapage
so that it's no longer small.

Reported by Noah Misch. Backpatch to all supported versions.
2014-03-12 10:10:04 +02:00
..
backend In WAL replay, restore GIN metapage unconditionally to avoid torn page. 2014-03-12 10:10:04 +02:00
bin Translation updates 2014-02-17 17:00:49 -05:00
include Fix dangling smgr_owner pointer when a fake relcache entry is freed. 2014-03-07 13:43:28 +02:00
interfaces Translation updates 2014-02-17 17:00:49 -05:00
makefiles Make pgxs build executables with the right suffix. 2013-01-19 14:54:29 -05:00
pl Translation updates 2014-02-17 17:00:49 -05:00
port Stamp 8.4.20. 2014-02-17 14:44:07 -05:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Prevent potential overruns of fixed-size buffers. 2014-02-17 11:20:38 -05:00
timezone Prevent potential overruns of fixed-size buffers. 2014-02-17 11:20:38 -05:00
tools Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:30 -05:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:06 +00:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +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 Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Add the possibility to specify an explicit validator function for foreign-data 2009-02-24 10:06:36 +00:00
Makefile.global.in Back-patch creation of tar.bz2 tarball during "make dist". 2011-07-03 16:40:28 -04:00
Makefile.shlib Fix assorted issues with build and install paths containing spaces. 2011-06-14 16:03:20 -04:00
nls-global.mk Do not msgmerge against /dev/null; merge against the pot file itself 2009-01-20 09:58:50 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00