Skip to content

Commit 396a44a

Browse files
committed
Fix masking of SP-GiST pages during xlog consistency check
spg_mask() didn't take into account that pd_lower equal to SizeOfPageHeaderData is still valid value. This commit fixes that. Backpatch to 11, where spg_mask() pg_lower check was introduced. Reported-by: Michael Paquier Discussion: https://postgr.es/m/20200615131405.GM52676%40paquier.xyz Backpatch-through: 11
1 parent 5b52008 commit 396a44a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/access/spgist/spgxlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,6 @@ spg_mask(char *pagedata, BlockNumber blkno)
10081008
* Mask the unused space, but only if the page's pd_lower appears to have
10091009
* been set correctly.
10101010
*/
1011-
if (pagehdr->pd_lower > SizeOfPageHeaderData)
1011+
if (pagehdr->pd_lower >= SizeOfPageHeaderData)
10121012
mask_unused_space(page);
10131013
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy