diff options
author | Alexander Korotkov | 2020-06-20 14:34:51 +0000 |
---|---|---|
committer | Alexander Korotkov | 2020-06-20 14:34:51 +0000 |
commit | a44dd932ff3816de7fe0414063cfcc5656117c3a (patch) | |
tree | 684f69f020c96f2af5a483606d0522aba2dad9c4 | |
parent | 15cb2bd27009f73a84a35c2ba60fdd105b4bf263 (diff) |
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
-rw-r--r-- | src/backend/access/spgist/spgxlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/spgist/spgxlog.c b/src/backend/access/spgist/spgxlog.c index 7be2291d07..999d0ca15d 100644 --- a/src/backend/access/spgist/spgxlog.c +++ b/src/backend/access/spgist/spgxlog.c @@ -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 * been set correctly. */ - if (pagehdr->pd_lower > SizeOfPageHeaderData) + if (pagehdr->pd_lower >= SizeOfPageHeaderData) mask_unused_space(page); } |