git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 15cb2bd)
Fix masking of SP-GiST pages during xlog consistency check
2020年6月20日 14:34:51 +0000 (17:34 +0300)
2020年6月20日 14:34:51 +0000 (17:34 +0300)
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


diff --git a/src/backend/access/spgist/spgxlog.c b/src/backend/access/spgist/spgxlog.c
index 7be2291d07e94588c33a5b3922f063d42a662c54..999d0ca15d5687ebba75ecbeecad51076d57d5d0 100644 (file)
--- 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);
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /