BRIN: mask BRIN_EVACUATE_PAGE for WAL consistency checking
authorAlvaro Herrera <[email protected]>
Fri, 5 Aug 2022 16:00:17 +0000 (18:00 +0200)
committerAlvaro Herrera <[email protected]>
Fri, 5 Aug 2022 16:00:17 +0000 (18:00 +0200)
commit2cff3025906c657297ef7bf323fa715f81d20038
tree1ce2418da28159926fc081ce8cd05477985a456f
parentaa242501afb76d6806260bff3bc8494e0a7f2a69
BRIN: mask BRIN_EVACUATE_PAGE for WAL consistency checking

That bit is unlogged and therefore it's wrong to consider it in WAL page
comparison.

Add a test that tickles the case, as branch testing technology allows.

This has been a problem ever since wal consistency checking was
introduced (commit a507b86900f6 for pg10), so backpatch to all supported
branches.

Author: 王海洋 (Haiyang Wang) <[email protected]>
Reviewed-by: Kyotaro Horiguchi <[email protected]>
Discussion: https://postgr.es/m/CACciXAD2UvLMOhc4jX9VvOKt7DtYLr3OYRBhvOZ-jRxtzc_7Jg@mail.gmail.com
Discussion: https://postgr.es/m/CACciXADOfErX9Bx0nzE_SkdfXr6Bbpo5R=v_B6MUTEYW4ya+cg@mail.gmail.com
src/backend/access/brin/brin_pageops.c
src/backend/access/brin/brin_xlog.c
src/test/modules/brin/Makefile
src/test/modules/brin/t/02_wal_consistency.pl [new file with mode: 0644]