aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_gist.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-04-17 17:47:50 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-04-17 17:47:50 +0300
commit2a8e1ac598c864ac2775f33da21a117c363c6c7f (patch)
tree82763e33fc833849e1c6fe90d53cbd518cd7feaf /contrib/btree_gist/btree_gist.c
parent5f86cbd714c9d43c0fbb43a7b172f77ebf429548 (diff)
downloadpostgresql-2a8e1ac598c864ac2775f33da21a117c363c6c7f.tar.gz
postgresql-2a8e1ac598c864ac2775f33da21a117c363c6c7f.zip
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.
Diffstat (limited to 'contrib/btree_gist/btree_gist.c')
0 files changed, 0 insertions, 0 deletions