v2_PG19-0007-Stop-masking-PD_ALL_VISIBLE-when-checking-WA.patch
text/x-patch
Filename: v2_PG19-0007-Stop-masking-PD_ALL_VISIBLE-when-checking-WA.patch
Type: text/x-patch
Part: 6
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v2-0007
Subject: Stop masking PD_ALL_VISIBLE when checking WAL consistency
| File | + | − |
|---|---|---|
| src/backend/access/common/bufmask.c | 0 | 6 |
From 1d2945bb01e68158eb812928301b1fed44ddb33e Mon Sep 17 00:00:00 2001 From: Melanie Plageman <melanieplageman@gmail.com> Date: Wed, 29 Apr 2026 10:33:46 -0400 Subject: [PATCH v2_PG19 7/8] Stop masking PD_ALL_VISIBLE when checking WAL consistency Setting and clearing PD_ALL_VISIBLE is WAL-logged, so there is no need to mask it for the purposes of WAL consistency checking. There is one minor exception, which is that when fixing VM corruption, we clear PD_ALL_VISIBLE on the heap page without specifically emitting WAL. This is a situation where corruption has already happened, however, so it is okay if WAL consistency checking flags this as well. Stop masking PD_ALL_VISIBLE, as doing so can only conceal real bugs. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/flat/CAAKRu_bn%2Be7F4yPFBgFbnP%2BsyJRKyNK092bjD2LKvZW7O4Svag%40mail.gmail.com --- src/backend/access/common/bufmask.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/backend/access/common/bufmask.c b/src/backend/access/common/bufmask.c index 5f63d04c9cb..93e34ea38b8 100644 --- a/src/backend/access/common/bufmask.c +++ b/src/backend/access/common/bufmask.c @@ -53,12 +53,6 @@ mask_page_hint_bits(Page page) /* Ignore PD_PAGE_FULL and PD_HAS_FREE_LINES flags, they are just hints. */ PageClearFull(page); PageClearHasFreeLinePointers(page); - - /* - * PD_ALL_VISIBLE is masked during WAL consistency checking. XXX: It is - * worth investigating if we could stop doing this. - */ - PageClearAllVisible(page); } /* -- 2.43.0