]> granicus.if.org Git - postgresql/commit
Attach FPI to the first record after full_page_writes is turned on.
authorAmit Kapila <akapila@postgresql.org>
Thu, 13 Sep 2018 10:38:55 +0000 (16:08 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 13 Sep 2018 10:38:55 +0000 (16:08 +0530)
commitfd4f2af774db6a978130da88e94e7425c07651d5
tree4a52b782a2ecb75af13f5f9aeb4c27c64bfbec45
parent4659632dbaadc33baa9fa42c49582d5f8e77f711
Attach FPI to the first record after full_page_writes is turned on.

XLogInsert fails to attach a required FPI to the first record after
full_page_writes is turned on by the last checkpoint.  This bug got
introduced in 9.5 due to code rearrangement in commits 2c03216d83 and
2076db2aea.  Fix it by ensuring that XLogInsertRecord performs a
recomputation when the given record is generated with FPW as off but
found that the flag has been turned on while actually inserting the
record.

Reported-by: Kyotaro Horiguchi
Author: Kyotaro Horiguchi
Reviewed-by: Amit Kapila
Backpatch-through: 9.5 where this problem was introduced
Discussion: https://postgr.es/m/20180420.151043.74298611.horiguchi.kyotaro@lab.ntt.co.jp
src/backend/access/transam/xlog.c