Skip to content

Commit 3f88e2d

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 2e155d9 commit 3f88e2d

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
@@ -1043,6 +1043,6 @@ spg_mask(char *pagedata, BlockNumber blkno)
10431043
* Mask the unused space, but only if the page's pd_lower appears to have
10441044
* been set correctly.
10451045
*/
1046-
if (pagehdr->pd_lower > SizeOfPageHeaderData)
1046+
if (pagehdr->pd_lower >= SizeOfPageHeaderData)
10471047
mask_unused_space(page);
10481048
}

0 commit comments

Comments
 (0)