mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-01 04:03:23 +02:00
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
This commit is contained in:
parent
e6c6f427e3
commit
39aafc88c4
@ -1008,6 +1008,6 @@ spg_mask(char *pagedata, BlockNumber blkno)
|
|||||||
* Mask the unused space, but only if the page's pd_lower appears to have
|
* Mask the unused space, but only if the page's pd_lower appears to have
|
||||||
* been set correctly.
|
* been set correctly.
|
||||||
*/
|
*/
|
||||||
if (pagehdr->pd_lower > SizeOfPageHeaderData)
|
if (pagehdr->pd_lower >= SizeOfPageHeaderData)
|
||||||
mask_unused_space(page);
|
mask_unused_space(page);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user