Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a44dd93

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 15cb2bd commit a44dd93

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)